Actually, where should I made lists images and targets?  I understand that in the __init__ but according to your words I can’t fill them, because I shouldn’t load there them elements (to have elements of lists I have to loads them at first)?
And isn’t __getitem__ loaded in every iteration of model? So if I have 4k iterations in 100 epoch it’s going to be loaded 400k times and every time size will be same as if I put it to __getitem__. Am I right?