You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You need to extract the zip first (I think) but I'm having issues with an archive header when I try to do so.
Hi, you do not need to extract it first; you've to load it directly with PyTorch as written in the code. I'm sorry about the misleading name (".tar") of the file, it's a naming convention that I picked up somewhere that is understandably confusing.
I think the first commenter had that issue because the checkpoint contains the model saved directly in its full form, i. e. not only the state/parameters (state_dict()) of the model. Therefore, it requires that the file containing the model definition, model.py, is in the same working directory when you load the checkpoint.
Hi, I downloaded your pre-trained model from google drive. But it gives an error when loading the checkpoint.
----> 1 ckp = torch.load('./checkpoint_ssd300.pth.tar')
~/anaconda3/envs/PyTorch/lib/python3.8/site-packages/torch/serialization.py in load(f, map_location, pickle_module, **pickle_load_args)
591 return torch.jit.load(opened_file)
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
~/anaconda3/envs/PyTorch/lib/python3.8/site-packages/torch/serialization.py in _legacy_load(f, map_location, pickle_module, **pickle_load_args)
770 unpickler = pickle_module.Unpickler(f, **pickle_load_args)
771 unpickler.persistent_load = persistent_load
--> 772 result = unpickler.load()
773
774 deserialized_storage_keys = pickle_module.load(f, **pickle_load_args)
ModuleNotFoundError: No module named 'model'
The text was updated successfully, but these errors were encountered: