I am trying to generate perturbed images in pytorch dataloader with trained ANN1 for another ANN2 in the __getitem__ function.
__getitem__
The problem is that I get