Epoch vs Batch Size vs Iterations
Epoch、Batch Size和Iterations详解
参考链接: link
关于深度学习在训练时常使用的Epoch、Batch Size和Iteration术语详解。
Epoch
One Epoch is when an ENTIRE dataset is passed forward and backward through the neural network only ONCE.
一个Epoch是指整个数据集通过神经网络前向和反向传播一次。
Batch Size
Total number of training examples present in a single batch.
Note: Batch size and number of batches are two different things.
有时候训练数据集包含的样本数过多,则一次全部输入进行训练不太现实,因此将训练数据集划分为多个Batch,而每个Batch所包含的样本数称之为Batch Szie。
例如,我们有一个包含10000个样本的训练数据集,将其划分为200个Batch,则Batch size = 10000/200 = 50。
Iterations
Iterations is the number of batches needed to complete one epoch.
Note:The number of batches is equal to number of iterations for one epoch.
Iterations(迭代次数)是指完成一个Epoch所需的Batch数量。
例如,我们有2000个训练样本,设置 Batch Size=50,则Batch数量=2000/50=200,即每个Epoch所需的Iterations为200。