Home » Android » ERROR:tensorflow:Couldn't understand architecture name ''

ERROR:tensorflow:Couldn't understand architecture name ''

Posted by: admin November 1, 2017 Leave a comment

Questions:

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

Answers:

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 ....