0

everyone! I'm new on Tensorflow. At Getting Started with TensorFlow, I got the tf.contrib.learn.io.numpy_input_fn({"x": x_train}, y_train, 4, num_epochs=1000) source. I wonder what does batch_size and num_epochs mean? I tried to change the tutorial value and get no effect for me.

I searched on Tensorflow and Github but fail.

Please let me know what's this or where could i search about it.

Trần Đức Tâm
  • 4,037
  • 3
  • 30
  • 58

1 Answers1

0

The idea is that we split the whole training set of data to the small chunks (batches). So batch_size sets the size of this chunk. And num_epochs describes the chunks quantity.
You could find the description in the comments of the Getting Started with TensorFlow:

# We have to tell the function how many batches
# of data (num_epochs) we want and how big each batch should be.
S. Stas
  • 800
  • 4
  • 8
  • Therefore what does `steps` mean? I think that `num_epochs` be the number of the training step. Is that right? – Trần Đức Tâm Jul 03 '17 at 08:38
  • No. They are related, but they are not the same things. See https://stackoverflow.com/questions/38340311/what-is-the-difference-between-steps-and-epochs and https://stackoverflow.com/questions/43319709/tensorflow-nr-of-epochs-vs-nr-of-training-steps – S. Stas Jul 03 '17 at 12:05