Error when running TensorFlow image retraining tutorial
<p>I have a very basic question about TensorFlow. I'm following the <a href="https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/index.html?index=..%2F..%2Findex#4" rel="nofollow">"TensorFlow for Poets" tutorial</a>, and I'm stuck at the image retraining, when I try to run this command:</p>

<pre><code># python 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
</code></pre>

<p>I got an error: <code>"--bottleneck_dir=/tf_files/bottlenecks: No such file or directory"</code></p>

<p>I have installed TensorFlow using Anaconda installation, and I didn't install Docker as it was recommended in the codelab tutorial. So my question is what am I doing wrong? Is it necessary to install Docker Toolbox? </p>

<p>From the error message, it looks like you have pasted the exact command from your question (and from the original tutorial) into the shell, and the <code>#</code> at the beginning was interpreted as a comment, and it's trying to execute the second line as a command.</p>

<p>If you paste the command <strong>without the <code>#</code></strong>, it should work:</p>

<pre><code>python 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
</code></pre>

<p>This looks like a bug in the tutorial&mdash;the second command on the same page doesn't have the <code>#</code>&mdash;so I've filed a <a href="https://github.com/tensorflow/tensorflow/issues/4444" rel="nofollow">GitHub issue</a> to get this fixed.</p>

python tensorflow