Solved by christopherkuemmel in post #7 
              
              
                @hanhvn I see the problem. You could pad your inputs to have always the same number of images. Meaning extending the number of images with zero filled images to (max_img, 1, max_neg_img). This could be done with a custom transform to pad for max image count in the whole dataset or the collate_fn for…