Hi @ptrblck ,I noticed in the source here 4 that the __getitem__ method of the image folder class returns a sample, target pair where sample is the image and target is the target label. In case of my dataset, how do I handle the case of three images having the same label ?
The forward method of my final model looks like this -
def forward(self,image1,image2,image3):
        x1 = self.model1(image1)
        x2 = self.model2(image2)
        x3 = self.model3(image3)
        x4 = torch.cat((x1, x2, x3), dim=1)
        x5 = self.classifier1(F.relu(x4))
        x6 = self.classifier2(F.relu(x5))
        x7 = self.classifier3(F.relu(x6))
        x8 = self.logSoftmax(x7)
        #print(x6.shape)
        return x8

In the train function, the images are fetched like -
for inputs, labels in dataloaders[phase]:
                inputs = inputs.to(device)
                labels = labels.to(device)
                .....

If I concatenate the three images in one tensor and pass along a single label, does the model understand it’s actually three images and treat it as such ? I feel a bit lost here.