Solved by Sergey_Gryaznov in post #2 
              
              
                I solved problems 

Yes, class expect a list of dictionary

__getitem__ is correct, the problem was in DataLoader and batches which he returned

solution 
def collate(batch):
    return tuple(zip(*batch))

dataloader = DataLoader(dataset, batch_size=5, collate_fn=collate)

And I get list of dictiona…