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
I'm facing a runtime error when loading the model, with the following parameters:
model = get_model("resnet50_2020-07-20", max_size=2048)
model.eval()
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-42-993dc68920c7> in <module>
----> 1 model = get_model("resnet50_2020-07-20", max_size=2048)
2 model.eval()
/workspace/.local/lib/python3.6/site-packages/retinaface/pre_trained_models.py in get_model(model_name, max_size, device)
18 def get_model(model_name: str, max_size: int, device: str = "cpu") -> nn.Module:
19 model = models[model_name].model(max_size=max_size, device=device)
---> 20 state_dict = model_zoo.load_url(models[model_name].url, progress=True, map_location="cpu")
21
22 model.load_state_dict(state_dict)
/opt/conda/lib/python3.6/site-packages/torch/hub.py in load_state_dict_from_url(url, model_dir, map_location, progress, check_hash)
507 cached_file = os.path.join(model_dir, extraced_name)
508
--> 509 return torch.load(cached_file, map_location=map_location)
/opt/conda/lib/python3.6/site-packages/torch/serialization.py in load(f, map_location, pickle_module, **pickle_load_args)
583 with _open_file_like(f, 'rb') as opened_file:
584 if _is_zipfile(opened_file):
--> 585 with _open_zipfile_reader(f) as opened_zipfile:
586 if _is_torchscript_zip(opened_zipfile):
587 warnings.warn("'torch.load' received a zip file that looks like a TorchScript archive"
/opt/conda/lib/python3.6/site-packages/torch/serialization.py in __init__(self, name_or_buffer)
243 class _open_zipfile_reader(_opener):
244 def __init__(self, name_or_buffer):
--> 245 super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer))
246
247
RuntimeError: version_ <= kMaxSupportedFileFormatVersion INTERNAL ASSERT FAILED at ../caffe2/serialize/inline_container.cc:132, please report a bug to PyTorch. Attempted to read a PyTorch file with version 3, but the maximum supported version for reading is 2. Your PyTorch installation may be too old.
I've tried upgrading torch and torchvision with !pip install --upgrade torch torchvision , as recommended by pytorch/vision#1943 but it wasn't resolved.
Current installed versions:
torch - 1.5.0a0+8f84ded
torchvision - 0.6.0a0
Any recommendations?
The text was updated successfully, but these errors were encountered:
How about try PyTorch 1.4 and torchvision 0.5.0? seems to work in similar problem but I'm not perfectly sure yet, and maybe there is more good version to safe.
!pip install torch=1.4 (torch vision also) and restart your colab or J.notebook
I'm facing a runtime error when loading the model, with the following parameters:
I've tried upgrading torch and torchvision with
!pip install --upgrade torch torchvision
, as recommended by pytorch/vision#1943 but it wasn't resolved.Current installed versions:
Any recommendations?
The text was updated successfully, but these errors were encountered: