The problem about Loading a Pytorch Model in C++

It has the similar problem with you, you can see this for solution.