无法获取 VGG: urllib.error.HTTPError: HTTP 错误 404: 未找到

作者: protoneqt创建于 2020年8月20日更新于 2022年3月2日

我正在尝试运行 train.py 来运行 SRGAN 代码: https://GitHub.com/tensorlayer/SRGAN 并且在以下行出现了错误: VGG = tl.models.vgg19(pretrained=True, end_with='pool4', mode='static') 可能是因为我有防火墙,但我不知道如何以其他方式获取此模型。我是否可以使用另一台计算机下载模型,然后将模型复制到我的计算机?如果可以,该如何操作?完整的错误如下: 追踪(最近一次调用): File "C:\Users\a.shlyapin\AppData\Local\JetBrains\Toolbox\apps\PyCharm-C\ch-0\201.7223.92\plugins\Python-ce\helpers\pydev\pydevd.py", line 1438, in _exec pydev_imports.execfile(file, globals, locals) # 执行脚本 File "C:\Users\a.shlyapin\AppData\Local\JetBrains\Toolbox\apps\PyCharm-C\ch-0\201.7223.92\plugins\Python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "E:/home/projects/deblur/git/srgan/train.py", line 205, in <module> train() File "E:/home/projects/deblur/git/srgan/train.py", line 79, in train VGG = tl.models.vgg19(pretrained=True, end_with='pool4', mode='static') File "E:\home\projects\main\git\enp\venv2\lib\site-packages\tensorlayer\models\vgg.py", line 319, in vgg19 restore_model(model, layer_type='vgg19') File "E:\home\projects\main\git\enp\venv2\lib\site-packages\tensorlayer\models\vgg.py", line 160, in restore_model maybe_download_and_extract(model_saved_name[layer_type], 'models', model_urls[layer_type]) File "E:\home\projects\main\git\enp\venv2\lib\site-packages\tensorlayer\files\\\\utils.py", line 2465, in maybe_download_and_extract _download(filename, working_directory, url_source) File "E:\home\projects\main\git\enp\venv2\lib\site-packages\tensorlayer\files\\\\utils.py", line 2458, in _download urlretrieve(url_source + filename, filepath, reporthook=_dlProgress) File "C:\Python37\lib\\\\urllib\request.py", line 247, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp: File "C:\Python37\lib\\\\urllib\request.py", line 222, in urlopen return opener.open(url, data, timeout) File "C:\Python37\lib\\\\urllib\request.py", line 531, in open response = meth(req, response) File "C:\Python37\lib\\\\urllib\request.py", line 641, in http_response 'http', request, response, code, msg, hdrs) File "C:\Python37\lib\\\\urllib\request.py", line 569, in error return self._call_chain(*args) File "C:\Python37\lib\\\\urllib\request.py", line 503, in _call_chain result = func(*args) File "C:\Python37\lib\\\\urllib\request.py", line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found

内容来源: tensorlayer/TensorLayer