Deeplearning4j: Iterations, Epochs, and ScoreIterationListener

岁酱吖の 提交于 2019-12-01 05:57:09

The DeepLearning4J documentation has some good insight, especially with respect to the difference between an epoch and an iteration.

According to DL4J's documentation:

"An iteration is simply one update of the neural net model’s parameters. Not to be confused with an epoch which is one complete pass through the dataset. Many iterations can occur before an epoch is over. Epoch and iteration are only synonymous if you update your parameters once for each pass through the whole dataset; if you update using mini-batches, they mean different things. Say your data has 2 minibatches: A and B. .numIterations(3) performs training like AAABBB, while 3 epochs looks like ABABAB."

With respect to your question and as referenced by this excerpt, if you set .iterations(1) and had only one batch, the iteration would be synonymous with 1 epoch, or one pass through the complete dataset. However, if you update using mini-batches, an epoch and an iteration would differ slightly -- an iteration would result in AAABBB, rather than an epoch, which would produce ABABAB (referenced by the example above).

Hopefully this answer and the documentation linked answers your question!

P.S. I apologize for the late reply; I stumbled on this question very recently!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!