insightface icon indicating copy to clipboard operation
insightface copied to clipboard

Loss Graph spike when epoch starting point

Open cxz1418 opened this issue 2 years ago • 1 comments

Hello~ I'm learning with my custom dataset with arcface_torch code but,

Even though it is not an LR adjustment interval, the loss drops significantly and then rises at the start of the Epoch. What's the problem?

image

cxz1418 avatar Oct 12 '23 01:10 cxz1418

My theory is the batch size and the size of your dataset. If your final mini-batch is not the same size as the others, the loss will be different because it's based on a smaller mini-batch size. Then at the start of the epoch, it's back to normal mini-batch sizes and the loss starts to go back to normal again. I could be wrong though, but I've seen similar drops/spikes in my own training.

marlowinnovations avatar Oct 31 '23 02:10 marlowinnovations