wheeeee
wheeeee

Reputation: 1505

tensorflow retrain.py understanding train_batch_size

I'm working my way through the Tensorflow InceptionV3 tutorial: https://www.tensorflow.org/tutorials/image_retraining#bottlenecks

I come across the following pargraph:

By default this script will run 4,000 training steps. Each step chooses ten images at random from the training set, finds their bottlenecks from the cache, and feeds them into the final layer to get predictions. Those predictions are then compared against the actual labels to update the final layer's weights through the back-propagation process.

Do the "ten images at random" mean that train_batch_size=10? Meanwhile in the source code I found this:

parser.add_argument(
    '--train_batch_size',
    type=int,
    default=100,
    help='How many images to train on at a time.'
)

Does this mean I'm interpreting the paragraph incorrectly? If so, what does train_batch_size mean, and how is it different from the ten random images? Or does it simply mean that the tutorial page is out of date with the actual code?

Source Code: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/image_retraining/retrain.py

Upvotes: 1

Views: 998

Answers (1)

wheeeee
wheeeee

Reputation: 1505

Turns out it was a typo. The 10 random images is actually supposed to be 100 random images, which corresponds to train_batch_size.

Pull request that addressed the issue: https://github.com/tensorflow/tensorflow/pull/17638

Upvotes: 1

Related Questions