title: What is an epoch when using keras generators?
body: <p>I want to use fit_generator to handle my data.</p>
  
  <p>I understand the generator must be running forever, and that samples_per_epoch defines the number of elements yielded from the generator before getting to the next epoch.</p>
  
  <p>But what is an epoch here ? When we run fit, an epoch is a run against the whole data set, split according to batch_size. But here, batch_size has no meaning since fit_generator works like calling train_on_batch on each element of the generator, and there is no such thing as "the whole dataset".</p>
  
  <p>My question is: do samples_per_epoch and nb_epoch have a meaning? Or in any case the network is trained the same way on samples_per_epoch*nb_epoch batches returned by the generator, and the epoch has no real meaning?</p>