码迷,mamicode.com
首页 > 其他好文 > 详细

踩坑MaskRCNN训练

时间:2019-07-05 11:08:19      阅读:720      评论:0      收藏:0      [点我收藏+]

标签:com   socket   rgs   ESS   error   imagenet   pytho   int   exce   

2019-07-05 10:00:02,156 maskrcnn_benchmark.utils.checkpoint INFO: Loading checkpoint from catalog://ImageNetPretrained/MSRA/R-101
2019-07-05 10:00:02,156 maskrcnn_benchmark.utils.checkpoint INFO: catalog://ImageNetPretrained/MSRA/R-101 points to https://dl.fbaipublicfiles.com/detectron/ImageNetPretrained/MSRA/R-101.pkl
Downloading: "https://dl.fbaipublicfiles.com/detectron/ImageNetPretrained/MSRA/R-101.pkl" to /home/em/.torch/models/R-101.pkl
Traceback (most recent call last):
File "/home/em/.conda/envs/MaskRCNN/lib/python3.6/urllib/request.py", line 1318, in do_open
encode_chunked=req.has_header(‘Transfer-encoding‘))
File "/home/em/.conda/envs/MaskRCNN/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/home/em/.conda/envs/MaskRCNN/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/home/em/.conda/envs/MaskRCNN/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/home/em/.conda/envs/MaskRCNN/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/home/em/.conda/envs/MaskRCNN/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/home/em/.conda/envs/MaskRCNN/lib/python3.6/http/client.py", line 1392, in connect
super().connect()
File "/home/em/.conda/envs/MaskRCNN/lib/python3.6/http/client.py", line 936, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/home/em/.conda/envs/MaskRCNN/lib/python3.6/socket.py", line 704, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/home/em/.conda/envs/MaskRCNN/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "tools/train_net.py", line 191, in <module>
main()
File "tools/train_net.py", line 184, in main
model = train(cfg, args.local_rank, args.distributed)
File "tools/train_net.py", line 65, in train
extra_checkpoint_data = checkpointer.load(cfg.MODEL.WEIGHT)
File "/data_1/software/pytorch/MaskRCNN/maskrcnn-benchmark/maskrcnn_benchmark/utils/checkpoint.py", line 61, in load
checkpoint = self._load_file(f)
File "/data_1/software/pytorch/MaskRCNN/maskrcnn-benchmark/maskrcnn_benchmark/utils/checkpoint.py", line 129, in _load_file
cached_f = cache_url(f)
File "/data_1/software/pytorch/MaskRCNN/maskrcnn-benchmark/maskrcnn_benchmark/utils/model_zoo.py", line 59, in cache_url
_download_url_to_file(url, cached_file, hash_prefix, progress=progress)
File "/home/em/.conda/envs/MaskRCNN/lib/python3.6/site-packages/torch/hub.py", line 372, in _download_url_to_file
u = urlopen(url)
File "/home/em/.conda/envs/MaskRCNN/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/home/em/.conda/envs/MaskRCNN/lib/python3.6/urllib/request.py", line 526, in open
response = self._open(req, data)
File "/home/em/.conda/envs/MaskRCNN/lib/python3.6/urllib/request.py", line 544, in _open
‘_open‘, req)
File "/home/em/.conda/envs/MaskRCNN/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/home/em/.conda/envs/MaskRCNN/lib/python3.6/urllib/request.py", line 1361, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/home/em/.conda/envs/MaskRCNN/lib/python3.6/urllib/request.py", line 1320, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>

 

 

 

 

解决方法:

手动下载(需要FQ)

https://dl.fbaipublicfiles.com/detectron/ImageNetPretrained/MSRA/R-101.pkl" to /home/em/.torch/models/R-101.pkl

https://dl.fbaipublicfiles.com/detectron/ImageNetPretrained/MSRA/R-101.pkl" to /home/em/.torch/models/R-50.pkl

然后放到/home/em/.torch/models/文件夹下,ok!

 

coco数据也要自己下载的哦,网址给你

https://www.aiuai.cn/aifarm931.html

 

踩坑MaskRCNN训练

标签:com   socket   rgs   ESS   error   imagenet   pytho   int   exce   

原文地址:https://www.cnblogs.com/guweixin/p/11136921.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!