tensorflow: Crash on retraining flowers

I am following the tutorial How to Retrain Inception’s Final Layer for New Categories but am getting this error:

...
3600 bottleneck files created.
Traceback (most recent call last):
  File "/Users/rick/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/tensorflow/examples/image_retraining/retrain.py", line 829, in <module>
    tf.app.run()
  File "/Users/rick/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/tensorflow/python/platform/default/_app.py", line 30, in run
    sys.exit(main(sys.argv))
  File "/Users/rick/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/tensorflow/examples/image_retraining/retrain.py", line 785, in main
    ground_truth_tensor: train_ground_truth})
  File "/Users/rick/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/tensorflow/python/client/session.py", line 332, in run
    result = self._run(None, fetches, feed_dict, options_ptr, run_outputs_ptr)
  File "/Users/rick/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/tensorflow/python/client/session.py", line 530, in _run
    % (np_val.shape, subfeed_t.name, str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (100, 2048) for Tensor u'pool_3/_reshape:0', which has shape '(1, 2048)'

Environment info

Operating System: OSX 10.11.1 El Capitan

I’ve installed from source from this commit ad1d98011ebc. I ran ./configure with the default answers and followed these build instructions

Steps to reproduce

cd ~
curl -O http://download.tensorflow.org/example_images/flower_photos.tgz
tar xzf flower_photos.tgz
bazel build -c opt --copt=-mavx tensorflow/examples/image_retraining:retrain
# Crashes with error above
bazel-bin/tensorflow/examples/image_retraining/retrain --image_dir ~/flower_photos

What have you tried?

  1. I’ve tried deleting /tmp/bottleneck and re-running, but I got the same error.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 16 (10 by maintainers)

Commits related to this issue

Most upvoted comments

We have just got a fix completed and approved, I should be able to check it in this evening. Apologies for the breakage!