I’m trying to convert my network trained in pytorch to libtorch for inference. However, I run into this c++ exception: There is an unhandled exception at 0x00007FFC58E69709 (located in cp.exe): Microsoft C ++ exception: c10 :: Error at memory location 0x0000008CF9F0F7B0.
Here is a piece of code for testing:
I am getting exactly the same error but on a slightly different trivial example when using torchvision (C++) directly. The error appears when I try to use a VGG16 network but it works normally for a ResNet. I have submitted the issue in the torchvision repo: https://github.com/pytorch/vision/issues/2245
Can anyone verify if it is related to this bug or it is on the torchvision side?
I am getting exactly the same error on a totally different scenario with torch.cholesky_solve where on libtorch 1.4.0 I had none. I am really interested on this.
Downloaded previous 1.4.0 and confirmed the problem is with 1.5.0. Trying to write minimal reproducible example to report the bug.
Just solved my “bug” trying to produce the minimal reproducible example.
My VStudio 2019 Project was not properly configured. I was mixing libtorch 1.4 headers with 1.5 binaries @Rem_H I recommend you copy the configuration from the cmake project created based on the minimal example here and using the x64 native Tools Command Prompt