GauGan中下载错误

不知道为什么,按照readme中完善了train脚本,运行过程中需要下载文件,然后就报错了。
Traceback (most recent call last):
File “/opt/conda/lib/python3.8/urllib/request.py”, line 1350, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File “/opt/conda/lib/python3.8/http/client.py”, line 1240, in request
self._send_request(method, url, body, headers, encode_chunked)
File “/opt/conda/lib/python3.8/http/client.py”, line 1286, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File “/opt/conda/lib/python3.8/http/client.py”, line 1235, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File “/opt/conda/lib/python3.8/http/client.py”, line 1006, in _send_output
self.send(msg)
File “/opt/conda/lib/python3.8/http/client.py”, line 946, in send
self.connect()
File “/opt/conda/lib/python3.8/http/client.py”, line 1402, in connect
super().connect()
File “/opt/conda/lib/python3.8/http/client.py”, line 917, in connect
self.sock = self._create_connection(
File “/opt/conda/lib/python3.8/socket.py”, line 787, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File “/opt/conda/lib/python3.8/socket.py”, line 918, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/public/home/acy5h6d4oe/.local/lib/python3.8/site-packages/jittor_utils/misc.py”, line 65, in download_url_to_local
urllib.request.urlretrieve(
File “/opt/conda/lib/python3.8/urllib/request.py”, line 247, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File “/opt/conda/lib/python3.8/urllib/request.py”, line 222, in urlopen
return opener.open(url, data, timeout)
File “/opt/conda/lib/python3.8/urllib/request.py”, line 525, in open
response = self._open(req, data)
File “/opt/conda/lib/python3.8/urllib/request.py”, line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File “/opt/conda/lib/python3.8/urllib/request.py”, line 502, in _call_chain
result = func(*args)
File “/opt/conda/lib/python3.8/urllib/request.py”, line 1393, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File “/opt/conda/lib/python3.8/urllib/request.py”, line 1353, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “spade_train.py”, line 35, in
trainer = Pix2PixTrainer(opt)
File “/public/home/acy5h6d4oe/JGAN/models/gaugan/pix2pix_trainer.py”, line 18, in init
self.pix2pix_model = Pix2PixModel(opt)
File “/public/home/acy5h6d4oe/JGAN/models/gaugan/models/pix2pix_model.py”, line 35, in init
self.criterionVGG = networks.VGGLoss(self.opt.gpu_ids)
File “/public/home/acy5h6d4oe/JGAN/models/gaugan/models/networks/loss.py”, line 107, in init
self.vgg = VGG19()
File “/public/home/acy5h6d4oe/JGAN/models/gaugan/models/networks/architecture.py”, line 97, in init
vgg_pretrained_features = models.vgg19(pretrained=True).features
File “/public/home/acy5h6d4oe/.local/lib/python3.8/site-packages/jittor/models/vgg.py”, line 109, in vgg19
if pretrained: model.load(“jittorhub://vgg19.pkl”)
File “/public/home/acy5h6d4oe/.local/lib/python3.8/site-packages/jittor/init.py”, line 1575, in load
self.load_parameters(load(path))
File “/public/home/acy5h6d4oe/.local/lib/python3.8/site-packages/jittor/init.py”, line 1059, in load
model_dict = safeunpickle(path)
File “/public/home/acy5h6d4oe/.local/lib/python3.8/site-packages/jittor/init.py”, line 88, in safeunpickle
download_url_to_local(path, base, compiler.ck_path, None)
File “/public/home/acy5h6d4oe/.local/lib/python3.8/site-packages/jittor_utils/lock.py”, line 59, in inner
ret = func(*args, **kw)
File “/public/home/acy5h6d4oe/.local/lib/python3.8/site-packages/jittor_utils/misc.py”, line 74, in download_url_to_local
raise RuntimeError(msg)
RuntimeError: <urlopen error [Errno -2] Name or service not known>
Download File failed, url: https://cg.cs.tsinghua.edu.cn/jittor/assets/build/checkpoints/vgg19.pkl, path: /public/home/acy5h6d4oe/.cache/jittor/jt1.3.5/g++7.3.1/py3.8.3/Linux-3.10.0-9xcc/HYGONC86718532x39/default/checkpoints/vgg19.pkl

Download File failed, url: https://cg.cs.tsinghua.edu.cn/jittor/assets/build/checkpoints/vgg19.pkl, path: /public/home/acy5h6d4oe/.cache/jittor/jt1.3.5/g++7.3.1/py3.8.3/Linux-3.10.0-9xcc/HYGONC86718532x39/default/checkpoints/vgg19.pkl

根据报错信息,是网络问题导致下载失败,您可先检查此机器是否能够正常连接互联网;或者手动下载权重再上传至相应的目录。

好的,感谢解答