fchollet / deep-learning-models

Keras code and weights files for popular deep learning models.
MIT License
7.31k stars 2.46k forks source link

Create a ResNet50 model fails #17

Open fhdiaze opened 7 years ago

fhdiaze commented 7 years ago

Hi,

I have a problem when I try to create a ResNet50 model. I am getting the next error:

Note: My keras version is keras.version='1.1.0'

Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.2/resnet50_weights_th_dim_ordering_th_kernels_notop.h5

Exception Traceback (most recent call last)

in () 23 # CNN CONFIGURATION 24 frame = Input(shape=frameDims) ---> 25 resNet50 = ResNet50(include_top=False, weights='imagenet') 26 resNet50.trainable = False 27 flat = FlattenK() /home/fhdiaze/.local/lib/python2.7/site-packages/keras/applications/resnet50.pyc in ResNet50(include_top, weights, input_tensor) 207 TH_WEIGHTS_PATH_NO_TOP, 208 cache_subdir='models', --> 209 md5_hash='f64f049c92468c9affcd44b0976cdafe') 210 model.load_weights(weights_path) 211 if K.backend() == 'tensorflow': /home/fhdiaze/.local/lib/python2.7/site-packages/keras/utils/data_utils.pyc in get_file(fname, origin, untar, md5_hash, cache_subdir) 82 urlretrieve(origin, fpath, dl_progress) 83 except URLError as e: ---> 84 raise Exception(error_msg.format(origin, e.errno, e.reason)) 85 except HTTPError as e: 86 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.2/resnet50_weights_th_dim_ordering_th_kernels_notop.h5: None -- [Errno 111] Connection refused Thanks.
EncodeTS commented 7 years ago

You can download it manually and place it in the ~/.keras/models folder.

muthiyanbhushan commented 7 years ago

Hello,

I am using Jetson TX2 (flashed with Jetpack 3.0) for the tutorial "ImageNet classification with Python and Keras". I have installed all the dependencies. I tried running the script as mentioned in the tutorial. It gave me below error:

Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg16_weights_tf_dim_ordering_tf_kernels.h5 Traceback (most recent call last): File "test_imagenet.py", line 40, in model = VGG16(weights="imagenet") File "/home/nvidia/deep-learning-models/imagenet-example/vgg16.py", line 143, in VGG16 cache_subdir='models') File "build/bdist.linux-aarch64/egg/keras/utils/data_utils.py", line 222, in get_file Exception: URL fetch failure on https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg16_weights_tf_dim_ordering_tf_kernels.h5: None -- [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)

I tried downloading file and placed it in ~/.keras/models folder. But still, I am getting the same error.

Can someone help me with this.

Thank you.

nidebenmao commented 4 years ago

hello, I am a student,i have the same problem,can you tell me how you solved the problem

awshrishi commented 3 years ago

You can download it manually and place it in the ~/.keras/models folder.

This worked for me.