1/10/2023

SSLCertVerificationError when downloading pytorch model or datasets via torchvision

 

I tried to download resnet101 model via torchvision model 

ex) torchvision.models.resnet101(pretrained=True)

But it has such a error

---------------------------------------------------------------------------
SSLCertVerificationError                  Traceback (most recent call last)
F........


This line would solve this issue :

..

import ssl
ssl._create_default_https_context = ssl._create_unverified_context

..


Thank you.


www.marearts.com

No comments:

Post a Comment