deep-learning-models
deep-learning-models copied to clipboard
Inveption V3 weights loading problem
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
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
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
My solution for Mac OS X:
- 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.
- 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"
Great! Thanks a lot!