Hi @ptrblck ,
I am trying to load pretrained vggface2 model via the following command:
from facenet_pytorch import InceptionResnetV1
resnet = InceptionResnetV1(pretrained='vggface2').eval()
and I get the following error:
---------------------------------------------------------------------------
EOFError Traceback (most recent call last)
<ipython-input-4-bec9f4ede2ac> in <module>
----> 1 resnet = InceptionResnetV1(pretrained='vggface2').eval()
c:\users\iarya\anaconda3\envs\opencv-env\lib\site-packages\facenet_pytorch\models\inception_resnet_v1.py in __init__(self, pretrained, classify, num_classes, dropout_prob, device)
259
260 if pretrained is not None:
--> 261 load_weights(self, pretrained)
262
263 if self.num_classes is not None:
c:\users\iarya\anaconda3\envs\opencv-env\lib\site-packages\facenet_pytorch\models\inception_resnet_v1.py in load_weights(mdl, name)
334 with open(cached_file, 'wb') as f:
335 f.write(r.content)
--> 336 state_dict.update(torch.load(cached_file))
337
338 mdl.load_state_dict(state_dict)
c:\users\iarya\anaconda3\envs\opencv-env\lib\site-packages\torch\serialization.py in load(f, map_location, pickle_module, **pickle_load_args)
591 return torch.jit.load(f)
592 return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
--> 593 return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
594
595
c:\users\iarya\anaconda3\envs\opencv-env\lib\site-packages\torch\serialization.py in _legacy_load(f, map_location, pickle_module, **pickle_load_args)
761 "functionality.".format(type(f)))
762
--> 763 magic_number = pickle_module.load(f, **pickle_load_args)
764 if magic_number != MAGIC_NUMBER:
765 raise RuntimeError("Invalid magic number; corrupt file?")
EOFError: Ran out of input
Can anyone provide the solution please?
Thanks