What do you mean by “pre-defined” batch size?
Usually the batch size is not a fixed number and can be changed during training and evaluation.
So if your last batch is smaller, it shouldn’t be a problem.