# Training cycle
for epoch in range(training_epochs):
# Loop over all batches
for i in range(total_batch):
...
外层表示训练周期、内层对batch进行迭代
Epoch
- Definiton:One forward pass and one backward pass of all the training examples. 即所有的样本都参与了训练,称为一个Epoch。
Batch-Size
- The number of training examples in one forward backward pass. 即每次训练时,进行一次前馈、一次反馈、一次更新所用的样本数量。
Iteration
- Number of passes, each pass using [batch size] number of examples. 即一个batch分成多少个,内层的迭代一共执行了多少次。例如,我们有10000个样本,batch-size为1000个,则它的Iteration=10000/1000=10,迭代的数量等于10