-4

once I run the following code on windows 10 tensor flow version 1.7.1

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

I get the following error

line 1326, in <module>
    tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)
AttributeError: module 'tensorflow' has no attribute 'app'

Can somebody help me please:(

  • i suggest to update your tensorflow version(2.x), and read this https://www.tensorflow.org/api_docs/python/tf/compat/v1/flags – prhmma Nov 10 '19 at 21:03
  • 3
    Possible duplicate of [AttributeError: module 'tensorflow' has no attribute 'app'](https://stackoverflow.com/questions/58258003/attributeerror-module-tensorflow-has-no-attribute-app) – phd Nov 10 '19 at 22:07
  • https://stackoverflow.com/search?q=%5Btensorflow%5D+AttributeError%3A+module+%27tensorflow%27+has+no+attribute+%27app%27 – phd Nov 10 '19 at 22:07

1 Answers1

0

See here: tensorflow retrain.py app.run() got unexpected keyword argument 'argv'

I think you need to update the version of your tensorflow.

Bill Chen
  • 1,699
  • 14
  • 24