Solved by AbdulsalamBande in post #2 
              
              
                Welcome Wan 
Sure, you can try the below 
import torch
from torch.utils.data import Dataset
class CustomDataloader(Dataset):
    def __init__(self, text, labels):
        self.text = text
        self.labels = labels

    def __len__(self):
        return len(self.text)

    def __getitem__(self, id…