0
$\begingroup$

Below is a toy example of a CNN that I am trying out. As is observed, the accuracy at the beginning of the first epoch is at 84% and it increases to 96% by the end.
With my understanding of backpropagation, the accuracy is expected to be the same when the next epoch begins - but that does not follow. The accuracy jumps to 98% (from 96%) at the beginning of the second epoch and then marginally increases by the end of it.
What explains the jump?

Epoch 1/10
 136/1875 [=>............................] - ETA: 51s - loss: 0.5260 - accuracy: 0.8419

Epoch 1/10
1875/1875 [==============================] - 55s - loss: 0.1315 - accuracy: 0.9606

Epoch 2/10
  64/1875 [=>............................] - ETA: 51s - loss: 0.0550 - accuracy: 0.9839

Epoch 2/10
1875/1875 [==============================] - 54s - loss: 0.0447 - accuracy: 0.9864

As another example, I have observed that the accuracy starts at, say, 95.88% at the beginning of an epoch, which is already higher than the end of the previous epoch. And as the epoch training progresses, the accuracy gradually decreases slightly down to, say, 95.52%.
I understand that overfitting and non-shuffled data that is responsible here. But are those the only reasons for this gradual decrease over a single epoch?

$\endgroup$

1 Answer 1

1
$\begingroup$

While the first accuracy shown for epoch 2 is near the beginning of epoch 2, it is not at the beginning - 64 batches of epoch 2 have already been processed. So at this point, you would expect there to be some change in the accuracy from the end of epoch 1.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.