Can't get VGG: urllib.error.HTTPError: HTTP Error 404: Not Found
Author: protoneqtCreated Aug 20, 2020Updated Mar 2, 2022
I'm trying to run train.py for SRGAN code: https://github.com/tensorlayer/SRGAN And I have the error in the following line: VGG = tl.models.vgg19(pretrained=True, end_with='pool4', mode='static') Probably, it's because I have a firewall but I don't know how to get this model another way. Can I download the model using another computer and just copy the model to my computer? If yes, how to do it? The full error is: Traceback (most recent call last):
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) # execute the script
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
Source: tensorlayer/TensorLayer