Closed fallcat closed 6 years ago
Hi!
It seems the saving
file in keras.engine
has been initialized after the last release of keras (2.1.6 -- relevant commit).
You can either:
Thank you! It seems to be a problem with Intel NLP Architect that they are not requiring the correct version.
@fallcat don't forget to close the issue if you don't have any more problems!
@fallcat How exactly did you fix this issue? I'm also trying to use NLP Architect and am running into the same error.
I'm trying to use keras_contrib and get the same issue when trying to import their save_load_utils file (which in turn is trying to import saving from keras) @RaphaelMeudec
@akshitharamachandran Sorry that I forgot to reply. I didn't fix the issue.... I saw https://github.com/NervanaSystems/nlp-architect/issues/4 so it's a problem with NLP Architect, and hopefully they will fix it.
in pre v2.1.6, it is from keras.models import load_model
It is super late but I want to give the solution in case somebody is still looking for it.
I am using Keras (2.1.3) and Tensorflow (1.3.0) and I saw that the developers rewrote the word saving as topology.
Therefore, in order to make it work, you need to modify (in your model file of ...\site-packages\mrcnn) this:
From:
from keras.engine import saving
To:
from keras.engine import topology
And from:
if by_name: saving.load_weights_from_hdf5_group_by_name(f, layers)
else: saving.load_weights_from_hdf5_group(f, layers)
To:
if by_name: topology.load_weights_from_hdf5_group_by_name(f, layers)
else: topology.load_weights_from_hdf5_group(f, layers)
topology
Tried this, But no luck unfortunately, getting same error.
i resolve this issue by downgrading to python 3.7 with keras 2.0.8 and tesnorflow 1.13.1. and it worked
I'm trying to use Intel NLP Architect and its example has this line that makes it not working:
Anyone knows how to fix it? Thank you! Also this is a link to the whole framework: http://nlp_architect.nervanasys.com/ner_crf.html But the line that makes it not working is just that one line.
========================================================================
Please make sure that the boxes below are checked before you submit your issue. If your issue is an implementation question, please ask your question on StackOverflow or join the Keras Slack channel and ask there instead of filing a GitHub issue.
Thank you!
[x] Check that you are up-to-date with the master branch of Keras. You can update with: pip install git+git://github.com/keras-team/keras.git --upgrade --no-deps
[x] If running on TensorFlow, check that you are up-to-date with the latest version. The installation instructions can be found here.
[x] If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with: pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps
[x] Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).