Can you replace
    train = Dataset('./Dataset/Input','./Dataset/ToRec','./Dataset/Train.csv')
    valid = Dataset('./Dataset/Input','./Dataset/ToRec','./Dataset/Validation.csv')

    train_loader = DataLoader(train, batch_size=64,num_workers=2)
    valid_loader = DataLoader(valid, batch_size=64,num_workers=2)


with
    train_dataset = Dataset('./Dataset/Input','./Dataset/ToRec','./Dataset/Train.csv')
    valid_dataset = Dataset('./Dataset/Input','./Dataset/ToRec','./Dataset/Validation.csv')

    train_loader = DataLoader(train_dataset, batch_size=64,num_workers=2)
    valid_loader = DataLoader(train_dataset, batch_size=64,num_workers=2)