I am using Tensorflow r0.12.
I use google-cloud-ml locally to run two different training exercises. In the first assignment, I find good starting values ββfor my variables. I store them at checkpoint V2.
When I try to restore my variables for use in the second task:
import tensorflow as tf sess = tf.Session() new_saver = tf.train.import_meta_graph('../variables_pred/model.ckpt-10151.meta', clear_devices=True) new_saver.restore(sess, tf.train.latest_checkpoint('../variables_pred/')) all_vars = tf.trainable_variables() for v in all_vars: print(v.name)
The following error message appeared:
tensorflow.python.framework.errors_impl.InternalError: Unable to get element from the feed as bytes.
A breakpoint is created with these lines in the first job:
saver = tf.train.Saver() saver.export_meta_graph(filename=os.path.join(output_dir, 'export.meta')) saver.save(sess, os.path.join(output_dir, 'export'), write_meta_graph=False)
According to this answer, this may be due to the lack of a metadata file, but I am uploading a metadata file.
PS: I use the argument clear_devices=True , because the device specifications created at startup in google-cloud-ml are quite complicated, and I donβt need to receive the same send.
python tensorflow google-cloud-ml
Thibaut loiseleur
source share