My Linux server : titan v x 4
My Win10 pc : 1080ti
I trained my model in Linux server, and saved model using this code ‘netG.state_dict()’.
And I have checked that there is no problem loading the model under Linux server.
However, despite using the same code and model, this error occurs when loading in win10.
Traceback (most recent call last):
File “D:/home/hdd/cjr/pytorch-fid-master/fid_for_networks.py”, line 62, in
recon_ar = Reconstructor_SR(net)
File “D:\home\hdd\cjr\pytorch-fid-master\reconstructor_SR.py”, line 197, in init
self.netG.load_state_dict(new_state_dict)
File “C:\Users\10127\Anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py”, line 721, in load_state_dict
self.class.name, “\n\t”.join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for DataParallel:
Unexpected key(s) in state_dict: “module.residual_block1.bn1.num_batches_tracked”, “module.residual_block1.bn2.num_batches_tracked”, “module.residual_block2.bn1.num_batches_tracked”, “module.residual_block2.bn2.num_batches_tracked”, “module.residual_block3.bn1.num_batches_tracked”,
Is there a difference between the way Pytorch save on Linux and the way Pytorch save on Windows?
If there are differences, how can we solve this problem?