Microsofct C++ exception: torch::jit::ErrorReport at memory location 0x0000

Hi there, I am trying to migrate faster rcnn implementation of torchvision to c++ to do that I simply run these lines of code to obtain ‘pt’ file.

model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True)
model.eval()
script_model = torch.jit.script(model)

This part is work as intended but after when I try to upload this produced model in c++ I get the Microsofct C++ exception: torch::jit::ErrorReport at memory location 0x0000… error. Any ideas about what should i do?

Could you post the complete error message, please?

Hi, the whole message ;
Unhandled exception at 0x00007FF9013A3C58 in TorchDeneme2.exe: Microsoft C++ exception: torch::jit::ErrorReport at memory location 0x000000A7B4199900.

Thanks for the update. I’m not familiar enough with Windows, unfortunately, and the error message doesn’t give a lot of information, so we might need to wait for a Windows expert.