Hi,
Do you always load the same batch during training? Why does load_sample is not a function of i? You might want to check pytorch’s Dataset and Dataloader.
To replace vrn.xp.asarray, it depends what image and label are. And what this function was doing originally?