@ptrblck  The model that i currently have trains, but the gpu volatility keeps going to 0, which is making the training really slow is there a way solve this?Thanks in advance.
class OdirDataset(Dataset):
    """Dataset wrapping images and target labels for Kaggle - Planet Amazon from Space competition
    Arguments:
        A CSV file path
        Path to image folder
        Extension of images
        PIL transforms
    """

    def __init__(self, csv_path, img_path, img_ext, transform=None):
        tmp_df = pd.read_csv(csv_path)
        self.img_path = img_path
        self.img_ext = img_ext
        self.transform = transform

        # import pdb;pdb.set_trace()
        self.X_train = tmp_df['Left-Fundus']
        self.y_train = tmp_df.iloc[:, 7:16].values

    def __getitem__(self, index):
        # import pdb;pdb.set_trace()
        img_left = Image.open(self.img_path + self.X_train[index] + self.img_ext)
        img_right= Image.open(self.img_path + self.X_train[0].split('_')[0] +'_right.jpg')
        img_left = img_left.convert('RGB')
        img_right = img_right.convert('RGB')
        if self.transform is not None:
            img_left  = self.transform(img_left)
            img_right = self.transform(img_right)

        img = np.concatenate([img_left,img_right],axis=0)
        label = torch.from_numpy(self.y_train[index])
        return img, label

    def __len__(self):
        return len(self.X_train.index)

 
transformations = transforms.Compose([transforms.Resize((224,224)),transforms.ToTensor()])
dset_train = OdirDataset(TRAIN_DATA,IMG_PATH,IMG_EXT,transformations)
dset_val = OdirDataset(TEST_DATA,IMG_PATH,IMG_EXT,transformations)
train_loader = DataLoader(dset_train,
                          batch_size=84,
                          shuffle=True,
                          num_workers=12,pin_memory=True)

val_loader = DataLoader(dset_val,
                          batch_size=1,
                          shuffle=False,
                          num_workers=12,pin_memory=True)