运行TensorFlow图像再训练教程时出错

Luc*_*irl 1 python tensorflow

我有一个关于TensorFlow的基本问题.我正在关注"TensorFlow for Poets"教程,当我尝试运行此命令时,我陷入了图像重新训练:

# 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
Run Code Online (Sandbox Code Playgroud)

我收到一个错误: "--bottleneck_dir=/tf_files/bottlenecks: No such file or directory"

我已经使用Anaconda安装安装了TensorFlow,并且我没有按照codelab教程中的建议安装Docker.所以我的问题是我做错了什么?是否有必要安装Docker Toolbox?

mrr*_*rry 5

从错误消息中,看起来您已将问题(以及原始教程)中的确切命令粘贴到shell中,并且#开头时将其解释为注释,并且它尝试将第二行作为命令执行.

如果你粘贴没有#的命令,它应该工作:

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
Run Code Online (Sandbox Code Playgroud)

这看起来像教程中的一个错误 - 同一页面上的第二个命令没有#-so我已经提交了一个GitHub问题来解决这个问题.