hello,
I am trying to run the tutorial 'How to Retrain Inception's Final Layer for New Categories'
available here:
https://www.tensorflow.org/versions/master/how_tos/image_retraining/index.htmlI do not use Bazel, I just do:
python retrain.py --image_dir ~/flower_photos
Everything runs smoothly, until I get this error:
Final test accuracy = 91.6%
Traceback (most recent call last):
File "retrain.py", line 829, in <module>
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/default/_app.py", line 30, in run
sys.exit(main(sys.argv))
File "retrain.py", line 820, in main
output_graph_def = graph_util.convert_variables_to_constants(
AttributeError: 'module' object has no attribute 'convert_variables_to_constants'
The problematic portion of the code is:
# Write out the trained graph and labels with the weights stored as constants.
output_graph_def = graph_util.convert_variables_to_constants(
sess, graph.as_graph_def(), [FLAGS.final_tensor_name])
with gfile.FastGFile(FLAGS.output_graph, 'wb') as f:
f.write(output_graph_def.SerializeToString())
with gfile.FastGFile(FLAGS.output_labels, 'w') as f:
f.write('\n'.join(image_lists.keys()) + '\n')
What should I do?