​ 在使用 LPIPS评价指标时,库需要从pytorch官网下载预训练AlexNet模型,下载时报错:

1
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable tp get local issuer certificate (_ssl.c:1045)>

​ ubuntu上解决方案:

1
2
3
sudo apt install ca-certificates
sudo update-ca-certificates --fresh
export SSL_CERT_DIR=/etc/ssl/certs