Hello @ptrblck ,
I have 100 images in a folder, but I am getting only one image location from the __getitem__.
def __init__(self, main_dir, label_full, transform):
  #Reading path and doing some operations
          #sorting images based on the name
        self.all_imgs = sorted(os.listdir(main_dir), key= lambda x : int(x.split("_")[0]))

def __getitem__(self, idx):
         img_loc = os.path.join(self.main_dir, self.all_imgs[idx])
        print(img_loc) # printing only 1 image location.
        image = Image.open(img_loc).convert("RGB")

Could you tell me why this is happening or I am doing some mistakes?