std::stringstream stream;
auto tensor = torch::ones({3, 4});
torch::save(tensor, stream);
torch::Tensor tensor2;
torch::load(tensor2, stream);

The very last line gives a Segmentation fault (core dumped).
Similar code was working fine on another machine, but in my current computer it doesn’t. What can be the problem?