Thanks for the reply. I don’t understand completely yet, but is it possible to restrict the number of samples from each dataset in a mini-batch with your solution? For example, 80 from dataset 1 and 20 from dataset 2.