Variation in epoch time

Hi . I was training a model . my first epoch took 3393 seconds and the rest took only 70 seconds .Why does this happens , can you explain it.

The only explanation I have to offer is that during the 1st epoch, the framework initialization of internal data structures consumes considerable time. This should hopefully affect the 1st batch and possibly the end of 1st epoch. Adding logs could help diagnose that. See keras.callbacks.Callback to get started on collecting diagnostics.

That said, please look at your epoch times. They are way too high. Why does your fastest epoch take 69s ? Fixing that should create a smaller model to achieve the desired cutoffs.