-
Notifications
You must be signed in to change notification settings - Fork 74k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError: u'SaveV2' when loading exported model #5639
Comments
@shelpuk I believe you are using a newer version of TensorFlow to make the graph, which then isn't readable by the older version of TensorFlow on the production machine. TensorFlow is not guaranteed to be forward compatible across versions. @petewarden Looks like this may be your importer code. Throwing an exception is correct, but |
Closing due to inactivity. Most likely due to needing a newer version of TensorFlow installed. Also see related commit improving error message. |
/home/pr/PycharmProjects/TensorVoice/venv/bin/python /home/pr/Documents/projects/speech_recognition/Speech_Commands/test.py
?? |
KeyErrors in loading a Tensorflow graph can be because of missing explicit import statements. I ran into the same error for
You can try a similar solution by looking up the relevant op that should be imported. |
KeyError: u'SSTableReaderV2' |
I also experienced "KeyError: 'CSVDataset'" while loading protobuf (saved_model.pb) thru tf.saved_model.loader.load. |
I have a TensorFLow model trained on a GPU machine. Next, I need to export it and deploy on CPU only production machine.
I have trained and exported a model from a GPU machine as described in MNIST export example. Saver object was initialized above.
Next, I am trying to load saved model to CPU machine with:
new_saver = tf.train.import_meta_graph('assets/saved_model/export.meta') new_saver.restore(sess, 'assets/saved_model/export')
And what I am getting is:
What is the reason of the error and how it could be fixed?
Production (CPU machine) environment info:
AWS instance type: m4.xlarge
Operating System: Ubuntu 14.04 x64
Installed version of CUDA and cuDNN: None, I am using CPU version of TF for the production environment
A link to the pip package you installed: https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0-cp27-none-linux_x86_64.whl
The output from
python -c "import tensorflow; print(tensorflow.__version__)"
: 0.11.0The text was updated successfully, but these errors were encountered: