image - AttributeError: module 'tensorflow.python.summary.summary' has no attribute 'histogram' -
i'm following "tensorflow poets" tutorial, , i'm stuck @ image retraining, when try run command:
sudo python3 tensorflow/tensorflow/examples/image_retraining/retrain.py --bottleneck_dir=/tf_files/bottlenecks --how_many_training_steps 500 --model_dir=/tf_files/inception --output_graph=/tf_files/retrained_graph.pb --output_labels=/tf_files/retrained_labels.txt --image_dir tf_files/flower_photos
and seems working fine,
creating bottleneck @ /tf_files/bottlenecks/roses/5960270643_1b8a94822e_m.jpg.txt creating bottleneck @ /tf_files/bottlenecks/roses/8032328803_30afac8b07_m.jpg.txt creating bottleneck @ /tf_files/bottlenecks/roses/14176042519_5792b37555.jpg.txt ...
but @ last, got error,
traceback (most recent call last): file "tensorflow/tensorflow/examples/image_retraining/retrain.py", line 1014, in <module> tf.app.run() file "/usr/local/lib/python3.5/dist-packages/tensorflow/python/platform/app.py", line 30, in run sys.exit(main(sys.argv[:1] + flags_passthrough)) file "tensorflow/tensorflow/examples/image_retraining/retrain.py", line 789, in main bottleneck_tensor) file "tensorflow/tensorflow/examples/image_retraining/retrain.py", line 698, in add_final_training_ops variable_summaries(layer_weights) file "tensorflow/tensorflow/examples/image_retraining/retrain.py", line 660, in variable_summaries tf.summary.histogram('histogram', var) attributeerror: module 'tensorflow.python.summary.summary' has no attribute 'histogram'
i'm using tensorflow on linux, , didn't install docker isn't necessary. don't know how fix because i'm beginner. please me..
apparently, problem calling attribute not present on objet tensorflow.python.summary.summay
. run dir(tensorflow.python.summary.summay)
to list methods , attributes of object, since may have gotten name changed in new versions.
also test using correct class (since summary.summary
seems pretty odd me)
Comments
Post a Comment