No, I don’t think using batches would reduce the imbalance.
E.g. if you are passing the complete dataset in a single batch, the imbalance would still be there.
Of course you could use the WeightedRandomSampler to create balanced batches.