warmspringwinds / pytorch-cpp

Pytorch C++ Library
369 stars 68 forks source link

How to find the operation of C++ functions respect to python? #21

Closed mjjdick closed 5 years ago

mjjdick commented 6 years ago

Hi, your work is great, and recently, I need to deploy the unet in C++, and I want to use pytorch model directly in C++. So ,I need write a C++ operation of ConvTranspose2d. I noticed that you write the operation of Conv2d, use the functions SpatialDilatedConvolution_updateOutput. so ,if I want to use ConvTranspose2d, which functions can I use, and how can i found them or are there any docs? Thx very much!!

walktree commented 5 years ago

Maybe you could try to export the model to script model, then load it in c++. check here: https://pytorch.org/tutorials/advanced/cpp_export.html

mjjdick commented 5 years ago

@walktree thx for your reply, it seems to be a new module in pytorch1.0, I will try~!