I'm following the instruction from google code lab
When I ran the following command I got some error.
python -m scripts.retrain \
--bottleneck_dir=tf_files/bottlenecks \
--how_many_training_steps=500 \
--model_dir=tf_files/models/ \
--summaries_dir=tf_files/training_summaries/"${ARCHITECTURE}" \
--output_graph=tf_files/retrained_graph.pb \
--output_labels=tf_files/retrained_labels.txt \
--architecture="${ARCHITECTURE}" \
--image_dir=tf_files/flower_photos
the error are
ERROR:tensorflow:Couldn't understand architecture name ''
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/nutron/Documents/android-codelab-projects/google-codelab-tensorflow-for-poets-2/scripts/retrain.py", line 1326, in <module>
tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)
File "/Users/nutron/tensorflow/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "/Users/nutron/Documents/android-codelab-projects/google-codelab-tensorflow-for-poets-2/scripts/retrain.py", line 976, in main
model_info = create_model_info(FLAGS.architecture)
File "/Users/nutron/Documents/android-codelab-projects/google-codelab-tensorflow-for-poets-2/scripts/retrain.py", line 923, in create_model_info
raise ValueError('Unknown architecture', architecture)
ValueError: ('Unknown architecture', '')
What I did it wrong or what should I do?
Thanks
Apparently, the error happened because ARCHITECTURE
was not set. You probably missed the step "Configure your MobileNet" in the doc. Please run the following command:
IMAGE_SIZE=224
ARCHITECTURE="mobilenet_0.50_${IMAGE_SIZE}"
before python -m scripts.retrain ...
.
For Windows:
SET IMAGE_SIZE=224<br/>
SET ARCHITECTURE="mobilenet_0.50_%IMAGE_SIZE%"
-
python -m scripts.retrain \
--bottleneck_dir=tf_files/bottlenecks \
--how_many_training_steps=500 \
--model_dir=tf_files/models/ \
--summaries_dir=tf_files/training_summaries/%ARCHITECTURE% \
--output_graph=tf_files/retrained_graph.pb \
--output_labels=tf_files/retrained_labels.txt \
--architecture="%ARCHITECTURE%" \
--image_dir=tf_files/flower_photos
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With