Closed parantap123 closed 4 years ago
You can try to change net.load_state_dict(checkpoint['net'])
to net.load_state_dict(checkpoint['net'].state_dict())
.
I hope this helps! :-)
I did not provide the pre-trained model for CK+
I did not provide the pre-trained model for CK+
Do you have that model to share on a google drive? thanks
I have not save these models.
File "visualize.py", line 43, in
net.load_state_dict(checkpoint['net'])
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 742, in load_state_dict
state_dict = state_dict.copy()
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 535, in getattr
type(self).name, name))
AttributeError: 'VGG' object has no attribute 'copy'
parantap@parantap-Inspiron-7548:~/codes/MTP/video_classification/codes/x/Facial-Expression-Recognition.Pytorch$ python3 visualize.py
Traceback (most recent call last):
File "visualize.py", line 43, in
net.load_state_dict(checkpoint['net'])
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 742, in load_state_dict
state_dict = state_dict.copy()
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 535, in getattr
type(self).name, name))
AttributeError: 'VGG' object has no attribute 'copy'
parantap@parantap-Inspiron-7548:~/codes/MTP/video_classification/codes/x/Facial-Expression-Recognition.Pytorch$ python3 visualize.py
Traceback (most recent call last):
File "visualize.py", line 43, in
net.load_state_dict(checkpoint['net'])
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 742, in load_state_dict
state_dict = state_dict.copy()
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 535, in getattr
type(self).name, name))
AttributeError: 'VGG' object has no attribute 'copy'