Oh, you mean that I should input same input like torch.ones first and then call model.eval() even I’ve already loaded .pt file in c++? Without that, is it not possible to initialize the model in c++?
After test your advice, it output the almost same result result with torch.ones and standard ResNet…