Could you explain me the output of keras at each iteration?
The loss that Keras calculates during the epoch is accumulated and estimated online. So it includes the loss from the model after different weight updates.
Let we clarify with an easy case: assume for a second that the model is only improving (every weight update results in better accuracy and loss), and that each epoch contains 2 weight updates (each min-batch is half the training dataset).
At epoch X, the first mini-batch is processed and the result is a loss score 2.0.
After updating the weights, the model runs its second mini-batch which results in a loss score of 1.0 (for just the mini-batch). however you will see a loss of 2.0 change to 1.5 (average over all the dataset).
Now we start epoch X+1, but it happens after another weight update which leads to a loss of 0.8 over the first mini-batch, which is shown to you. And so on and on...
The same thing happens during your training, only that obviously, not all changes are positive.
When I train a sequential model with keras using the method fit_generator, I see this output

Epoch 1/N_epochs
n/N [====================>..............] - ETA xxxx - loss: yyyy

I noticed that the loss decreased gradually with the number of steps, as expected. My problem is that I also noticed that when one epoch finishes and another one starts, the value of the loss is quite different from the one that I see at the end of the previous epoch.
Why so? I thought that epoch and number of steps per epochs was arbitrary values and using, for instance, 10 epochs with 1000 steps should be the same of 1000 epochs with 10 steps. But what does exactly happen between one epoch and the next one in Keras 2.0?
Disclaimer: I know the definition of epoch and how the number of steps should be decided using a batch generator, but I have too many data and I cannot apply this rule.