Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5
---------------------------------------------------------------------------
SSLError Traceback (most recent call last)
/home/s4szqx/anaconda3/lib/python3.6/urllib/request.py in do_open(self, http_class, req, **http_conn_args)
1317 h.request(req.get_method(), req.selector, req.data, headers,
-> 1318 encode_chunked=req.has_header('Transfer-encoding'))
1319 except OSError as err: # timeout error
/home/s4szqx/anaconda3/lib/python3.6/http/client.py in request(self, method, url, body, headers, encode_chunked)
1238 """Send a complete request to the server."""
-> 1239 self._send_request(method, url, body, headers, encode_chunked)
1240
/home/s4szqx/anaconda3/lib/python3.6/http/client.py in _send_request(self, method, url, body, headers, encode_chunked)
1284 body = _encode(body, 'body')
-> 1285 self.endheaders(body, encode_chunked=encode_chunked)
1286
/home/s4szqx/anaconda3/lib/python3.6/http/client.py in endheaders(self, message_body, encode_chunked)
1233 raise CannotSendHeader()
-> 1234 self._send_output(message_body, encode_chunked=encode_chunked)
1235
/home/s4szqx/anaconda3/lib/python3.6/http/client.py in _send_output(self, message_body, encode_chunked)
1025 del self._buffer[:]
-> 1026 self.send(msg)
1027
/home/s4szqx/anaconda3/lib/python3.6/http/client.py in send(self, data)
963 if self.auto_open:
--> 964 self.connect()
965 else:
/home/s4szqx/anaconda3/lib/python3.6/http/client.py in connect(self)
1399 self.sock = self._context.wrap_socket(self.sock,
-> 1400 server_hostname=server_hostname)
1401 if not self._context.check_hostname and self._check_hostname:
/home/s4szqx/anaconda3/lib/python3.6/ssl.py in wrap_socket(self, sock, server_side, do_handshake_on_connect, suppress_ragged_eofs, server_hostname, session)
400 server_hostname=server_hostname,
--> 401 _context=self, _session=session)
402
/home/s4szqx/anaconda3/lib/python3.6/ssl.py in __init__(self, sock, keyfile, certfile, server_side, cert_reqs, ssl_version, ca_certs, do_handshake_on_connect, family, type, proto, fileno, suppress_ragged_eofs, npn_protocols, ciphers, server_hostname, _context, _session)
807 raise ValueError("do_handshake_on_connect should not be specified for non-blocking sockets")
--> 808 self.do_handshake()
809
/home/s4szqx/anaconda3/lib/python3.6/ssl.py in do_handshake(self, block)
1060 self.settimeout(None)
-> 1061 self._sslobj.do_handshake()
1062 finally:
/home/s4szqx/anaconda3/lib/python3.6/ssl.py in do_handshake(self)
682 """Start the SSL/TLS handshake."""
--> 683 self._sslobj.do_handshake()
684 if self.context.check_hostname:
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)
During handling of the above exception, another exception occurred:
URLError Traceback (most recent call last)
/home/s4szqx/anaconda3/lib/python3.6/site-packages/keras/utils/data_utils.py in get_file(fname, origin, untar, md5_hash, cache_subdir)
112 urlretrieve(origin, fpath,
--> 113 functools.partial(dl_progress, progbar=progbar))
114 except URLError as e:
/home/s4szqx/anaconda3/lib/python3.6/urllib/request.py in urlretrieve(url, filename, reporthook, data)
247
--> 248 with contextlib.closing(urlopen(url, data)) as fp:
249 headers = fp.info()
/home/s4szqx/anaconda3/lib/python3.6/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)
222 opener = _opener
--> 223 return opener.open(url, data, timeout)
224
/home/s4szqx/anaconda3/lib/python3.6/urllib/request.py in open(self, fullurl, data, timeout)
525
--> 526 response = self._open(req, data)
527
/home/s4szqx/anaconda3/lib/python3.6/urllib/request.py in _open(self, req, data)
543 result = self._call_chain(self.handle_open, protocol, protocol +
--> 544 '_open', req)
545 if result:
/home/s4szqx/anaconda3/lib/python3.6/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args)
503 func = getattr(handler, meth_name)
--> 504 result = func(*args)
505 if result is not None:
/home/s4szqx/anaconda3/lib/python3.6/urllib/request.py in https_open(self, req)
1360 return self.do_open(http.client.HTTPSConnection, req,
-> 1361 context=self._context, check_hostname=self._check_hostname)
1362
/home/s4szqx/anaconda3/lib/python3.6/urllib/request.py in do_open(self, http_class, req, **http_conn_args)
1319 except OSError as err: # timeout error
-> 1320 raise URLError(err)
1321 r = h.getresponse()
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)>
During handling of the above exception, another exception occurred:
Exception Traceback (most recent call last)
<ipython-input-15-86dcea0ab0fa> in <module>()
98 preprocess, deprocess) = setup_model(
99 initial_value=initial,
--> 100 model_name='VGG16')
<ipython-input-15-86dcea0ab0fa> in setup_model(initial_value, model_name)
34 # VGG 16 model
35 model = VGG16(include_top=False, weights='imagenet',
---> 36 input_tensor=image_tensor)
37 elif model_name == 'VGG19':
38 model = VGG19(include_top=False, weights='imagenet',
/home/s4szqx/anaconda3/lib/python3.6/site-packages/keras/applications/vgg16.py in VGG16(include_top, weights, input_tensor, input_shape, pooling, classes)
166 weights_path = get_file('vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5',
167 WEIGHTS_PATH_NO_TOP,
--> 168 cache_subdir='models')
169 model.load_weights(weights_path)
170 if K.backend() == 'theano':
/home/s4szqx/anaconda3/lib/python3.6/site-packages/keras/utils/data_utils.py in get_file(fname, origin, untar, md5_hash, cache_subdir)
113 functools.partial(dl_progress, progbar=progbar))
114 except URLError as e:
--> 115 raise Exception(error_msg.format(origin, e.errno, e.reason))
116 except HTTPError as e:
117 raise Exception(error_msg.format(origin, e.code, e.msg))
Exception: URL fetch failure on https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5: None -- [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)