deep-learning-models icon indicating copy to clipboard operation
deep-learning-models copied to clipboard

Create a ResNet50 model fails

Open fhdiaze opened this issue 7 years ago • 4 comments

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.

fhdiaze avatar Oct 24 '16 14:10 fhdiaze

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

EncodeTS avatar Nov 04 '16 07:11 EncodeTS

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.

muthiyanbhushan avatar Jun 25 '17 18:06 muthiyanbhushan

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

nidebenmao avatar Oct 06 '19 07:10 nidebenmao

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

This worked for me.

awshrishi avatar Jun 08 '21 23:06 awshrishi