cyanM
March 29, 2019, 8:06am
1
I’m trying to port my refineDet model from ubuntu with python to Windows with c++,and it’s fine when loading modul with torch::jit::load,but std::runtime_error when forward() in Windows with C++.(But this step is fine in Ubuntu with c++, and if using the model in tutorial doc online, both is ok)
It will break in the following code:
Does anyone have a similar problem?
The problem is that you are using the debug
configuration with the release version of libtorch, which is not allowed for MSVC.
cyanM
March 30, 2019, 6:45am
3
I’m sure it’s release configuration, and if I load and forward with a model which is generated from the tutorial code(https://pytorch.org/tutorials/advanced/cpp_export.html ), this problem will not occur.
Makes no sense.
It doesn’t matter which linked library has debug symbols or not.
slaweks17
(Slaweks17)
March 30, 2019, 10:07pm
5
From what I heard, MS C++ does not allow linking a release library to a debug exe. Something about ABI incompatibility.
Could you try again with nightly debug version of libtorch so that we can get a detailed stack trace?
cyanM
April 3, 2019, 9:51am
7
tks, it doesn’t occur with nightly debug version of libtorch , so I’m going to try with nightly release version