The train accuracy value has a sudden rise at end of every epoch

Hello, I meet a problem during training. The train accuracy value has a sudden drop at end of every epoch. It is stranger,how to explain this issue?
(ps: I have shuffled the dataloader option: shuffle=True)

Could you check or post the code you are using to calculate the loss or accuracy?
I guess the last batch might be smaller, while you might be using the batch size to calculate the metric.

Oh, you are right. Thanks for your reply.