What is the use of train_on_batch() in keras?

后端 未结 4 1698
故里飘歌
故里飘歌 2020-12-14 06:05

How train_on_batch() is different from fit()? What are the cases when we should use train_on_batch()?

4条回答
  •  醉话见心
    2020-12-14 07:00

    Indeed @nbro answer helps, just to add few more scenarios, lets say you are training some seq to seq model or a large network with one or more encoders. We can create custom training loops using train_on_batch and use a part of our data to validate on the encoder directly without using callbacks. Writing callbacks for a complex validation process could be difficult. There are several cases where we wish to train on batch.

    Regards, Karthick

提交回复
热议问题