Hello, I tried to load pre-trained efficientnet_b0
using the code found here.
I used the following:
from torchvision.models import efficientnet_b0, EfficientNet_B0_Weights
weight = EfficientNet_B0_Weights.DEFAULT
effModel = efficientnet_b0(weights=weight)
but I keep getting the error message saying:
Traceback (most recent call last):
File "path", line 13, in <module>
effModel = efficientnet_b0(weights=weight)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path\Python\Python311\Lib\site-packages\torchvision\models\_utils.py", line 142, in wrapper
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "path\Python\Python311\Lib\site-packages\torchvision\models\_utils.py", line 228, in inner_wrapper
return builder(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "path\Python\Python311\Lib\site-packages\torchvision\models\efficientnet.py", line 770, in efficientnet_b0
return _efficientnet(
^^^^^^^^^^^^^^
File "path\Programs\Python\Python311\Lib\site-packages\torchvision\models\efficientnet.py", line 360, in _efficientnet
model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path\Python\Python311\Lib\site-packages\torchvision\models\_api.py", line 90, in get_state_dict
return load_state_dict_from_url(self.url, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path\Python\Python311\Lib\site-packages\torch\hub.py", line 766, in load_state_dict_from_url
download_url_to_file(url, cached_file, hash_prefix, progress=progress)
File "path\Python\Python311\Lib\site-packages\torch\hub.py", line 663, in download_url_to_file
raise RuntimeError(f'invalid hash value (expected "{hash_prefix}", got "{digest}")')
RuntimeError: invalid hash value (expected "3dd342df", got "7f5810bc96def8f7552d5b7e68d53c4786f81167d28291b21c0d90e1fca14934")
Could someone take a look at this please? Thank you a lot!