Before_batch callback not called on last batch

I’m trying to build some variations on mixup, but the before_batch callback isn’t being executed on the last batch within each epoch.

Is there a way to change this so that the before_batch callback gets executed for every batch?

Set the downloader attribute train.drop_last = False to include the last partial batch in training.


dls.train.drop_last = False