3

I am trying to run the Tensorflow for Poets sample. I pass the following:

python examples/image_retraining/retrain.py --bottlenext_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

I get the error

File "examples/image_retraining/retrain.py", line 1013, in <module> tf.app.run(main=main, argv=[sys.argv[0]] + unparsed) TypeError: run() got an unexpected keyword argument 'argv'

When I check the source of app.py it shows argv as an argument. According to t.version I am running 0.11.0rc0

Any ideas?

JerryKur
  • 7,279
  • 6
  • 24
  • 33
  • Can you give more details on how the build is done? I see [this problem](http://stackoverflow.com/questions/40357548/inception-v3-guide-on-tensorflow-broken-for-c-and-python) recommended as a bug report to the TF GitHub site. [This posting](http://stackoverflow.com/questions/40467893/running-mnist-softmax-py-on-tensorflow-installed-with-docker) hit the problem with Docker. – Prune Nov 09 '16 at 18:21
  • Thanks. I installed into a virtualenv with conda. I just tried reinstalling using the command "conda install -c conda-forge tensorflow". It installed version 0.11.0rc2 – JerryKur Nov 09 '16 at 22:53

3 Answers3

6

I had the same problem earlier. Downloading the examples from a different branch fixed it.

git clone -b r0.11 https://github.com/tensorflow/tensorflow.git
0

Please check your sample's version. I met the same problem and finally solved it. I found my tf version is 0.11, but I downloaded the master one, then I compare the code asyntax difference.

EluciusFTW
  • 2,565
  • 6
  • 42
  • 59
origin
  • 9
  • 1
-1

You can also specifically checkout just the working fully_connected_feed.py file from the r0.11 branch by using the git command:

git checkout 5b18edb fully_connected_feed.py

NOTE: You need to be in the mnist/ directory to use this command