Sampling classes to balance

Hi, I’m working on a multi-class image classification problem. Currently I’m undersampling the majority classes to balance across 3 classes (I’m using .from_df). I’m also trying without any balancing.

As a middle ground, I’d like to try using a balanced number of each class for each epoch, but with a new random sample at each epoch, so that I make use of more data. I currently have no idea how to go about this within fastai, so would anyone mind pointing me in the right direction?