I have trained a model in python and have saved it with the torch.jit and when I try to load the net into C++, I get an error:
python code:
traced_script_module.jit.save(“net_0.pt”)
traced_scrip_module = torch.jit.script(net)
C++ code:
torch::jit::script::Module open_net = torch::jit::load("…/net_0.pt");
terminate called after throwing an instance of ‘c10::Error’
what():  [enforce fail at inline_container.cc:144] . PytorchStreamReader failed reading zip archive: failed finding central directory
frame #0: c10::ThrowEnforceNotMet(char const*, int, char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, void const*) + 0x67 (0x7f119c091fc7 in /home/ubuntu/cfr/libtorch/lib/libc10.so)