Keras - How are batches and epochs used in fit_generator()?

后端 未结 3 553
梦谈多话
梦谈多话 2020-12-31 02:34

I have a video of 8000 frames, and I\'d like to train a Keras model on batches of 200 frames each. I have a frame generator that loops through the video frame-by-frame and a

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-31 02:56

    After the first epoch is complete (after the model logs batches 0-24), the generator picks up where it left off

    This is an accurate description of what happens. If you want to reset or rewind the generator, you'll have to do this internally. Note that keras's behavior is quite useful in many situations. For example, you can end an epoch after seeing 1/2 the data then do an epoch on the other half, which would be impossible if the generator status was reset (which can be useful for monitoring the validation more closely).

提交回复
热议问题