On my side it happens on Windows, I’m currently not able to test it on Linux.
A snipped of my code:
std::ifstream in( fileName, std::ios_base::binary);
m_TorchDevice = std::unique_ptr<torch::Device>( new torch::Device( torch::DeviceType::CPU) );
m_Model = torch::jit::load( in, *m_TorchDevice ); 
m_Model.eval();
torch::Tensor resultTensor = m_Model.forward( inputsVec ).toTensor(); 

Note that I have observed the same behaviour with GPU and CPU.
Best,
Thomas