fchollet / deep-learning-models

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

Inveption V3 weights loading problem #53

Open zw615 opened 7 years ago

zw615 commented 7 years ago

this code: model=InceptionV3(include_top=False, weights='imagenet', input_tensor=None, input_shape=None, pooling=None) always return this error

Exception: URL fetch failure on https://github.com/fchollet/deep-learning-models/releases/download/v0.5/inception_v3_weights_tf_dim_ordering_tf_kernels_notop.h5: None -- [Errno 10060]

So I want to manully download the weight file and use the model.load_weights method. However for keras 2 there are only TF weight file . I am using Theano 0.9.0 as backend. Is there any way to load inception_v3_weights_tf_dim_ordering_tf_kernels_notop.h5 while using Theano?

Also , How to fix this URL fetch failure

zw615 commented 7 years ago

Also , I see the source code of InceptionV3. I found this function

convert_all_kernels_in_model

And I use it before load weight model=InceptionV3(include_top=False, weights=None, input_tensor=None, input_shape=None, pooling=None) convert_all_kernels_in_model(model) model.load_weights(weight_path+'/inception_v3_weights_tf_dim_ordering_tf_kernels_notop.h5')

However, it still returns:

TypeError: Indexing elements must be in increasing order

zw615 commented 7 years ago

Now I can download weight from https://github.com/fchollet/deep-learning-models/releases/download/v0.5/inception_v3_weights_tf_dim_ordering_tf_kernels_notop.h5: But I still get:

TypeError: Indexing elements must be in increasing order

ClaudeCoulombe commented 6 years ago

My solution for Mac OS X:

1) Upgrade to Python 3.6.5 using the native app Python installer downloaded from the official Python language website https://www.python.org/downloads/

I've found that this installer is taking care of updating the links and symlinks for the new Python a lot better than homebrew.

2) Install a new certificate using "./Install Certificates.command" which is in the refreshed Python 3.6 directory

cd "/Applications/Python 3.6/" sudo "./Install Certificates.command"

jojolueken commented 5 years ago

Great! Thanks a lot!