This is the first part
getitem(self, i):
data, label = self.data[i], self.label[i]
#image=self.transforms.ToPILImage()(data).convert(“RGB”)
image = self.transform(Image.open(data).convert(“RGB”))
return image, label, data
it first returns image, label and data
So i want to extract the filenames(ids) from the inputs (data) and that I tried
for i, batch in enumerate(test_loader):
torch.device(“cuda” if torch.cuda.is_available() else " cpu")
ids=[ ]
data, _, ids= batch
data = data.to (device)
ids= ids.to(device)  # i want to get the ids here
return ids