在使用Beit模型时出现
- mmengine - INFO - load model from: https://download.openmmlab.com/mmselfsup/1.x/target_generator_ckpt/dalle_encoder.pth
07/19 11:27:30 - mmengine - INFO - Loads checkpoint by http backend from path: https://download.openmmlab.com/mmselfsup/1.x/target_generator_ckpt/dalle_encoder.pth
Downloading: “https://download.openmmlab.com/mmselfsup/1.x/target_generator_ckpt/dalle_encoder.pth” to /home_data/home/v-wangmei1/.cache/torch/hub/checkpoints/dalle_encoder.pth
Traceback (most recent call last):
File “/home_data/home/v-wangmei1/miniconda3/envs/mmlab/lib/python3.10/urllib/request.py”, line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File “/home_data/home/v-wangmei1/miniconda3/envs/mmlab/lib/python3.10/http/client.py”, line 1283, in request
self._send_request(method, url, body, headers, encode_chunked)
File “/home_data/home/v-wangmei1/miniconda3/envs/mmlab/lib/python3.10/http/client.py”, line 1329, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File “/home_data/home/v-wangmei1/miniconda3/envs/mmlab/lib/python3.10/http/client.py”, line 1278, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File “/home_data/home/v-wangmei1/miniconda3/envs/mmlab/lib/python3.10/http/client.py”, line 1038, in _send_output
self.send(msg)
File “/home_data/home/v-wangmei1/miniconda3/envs/mmlab/lib/python3.10/http/client.py”, line 976, in send
self.connect()
File “/home_data/home/v-wangmei1/miniconda3/envs/mmlab/lib/python3.10/http/client.py”, line 1448, in connect
super().connect()
File “/home_data/home/v-wangmei1/miniconda3/envs/mmlab/lib/python3.10/http/client.py”, line 942, in connect
self.sock = self._create_connection(
File “/home_data/home/v-wangmei1/miniconda3/envs/mmlab/lib/python3.10/socket.py”, line 824, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File “/home_data/home/v-wangmei1/miniconda3/envs/mmlab/lib/python3.10/socket.py”, line 955, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
解决方法:
点开红色框的链接将.pth文件下载,放在绿色框的文件夹下
之后就可以成功运行了