epoch, batch_size,iteration

In the neural network terminology:
one epoch = one forward pass and one backward pass of all the training examples
batch size = the number of training examples in one forward/backward pass. The higher the batch size, the more memory space you'll need.
number of iterations = number of passes, each pass using [batch size] number of examples. To be clear, one pass = one forward pass + one backward pass (we do not count the forward pass and backward pass as two different passes).

Example: if you have 1000 training examples, and your batch size is 500, then it will take 2 iterations to complete 1 epoch.

深度学习中经常看到epoch、 iteration和batchsize,下面按自己的理解说说这三个的区别:


(1)batchsize:批大小。在深度学习中,一般采用SGD训练,即每次训练在训练集中取batchsize个样本训练;

(2)iteration:1个iteration等于使用batchsize个样本训练一次;

(3)epoch:1个epoch等于使用训练集中的全部样本训练一次;


举个例子,训练集有1000个样本,batchsize=10,那么:

训练完整个样本集需要:

100次iteration,1次epoch。


关于batchsize可以看看这里。

 

你可能感兴趣的:(Tensorflow)