using this I get the error as:
module.__init__() takes at most 2 arguments (3 given)

I am using google colab for this and the code I ran is this:
import torch
import torch.nn as nn
import torch.optim as optim
from torch.optim import lr_scheduler
import numpy as np
import torchvision
from torchvision import datasets, models, transforms
import matplotlib.pyplot as plt
import time
import os
import copy

class CustomDataset(datasets):
    def __init__(self, path_cort, path_slice, transform):
        self.data_cort = datasets.ImageFolder(
            root=path_cort, transform=transform)
        self.data_slice = datasets.ImageFolder(
            root=path_slice, transform=transform)
        
    def __getitem__(self, index):
        x_cort, y = self.data_cort[index]
        x_slice, _ = self.data_slice[index]
        x = torch.cat((x_cort, x_slice), dim=1)
        return x, y
    
    def __len__(self):
        return len(self.data_cort) # assert both datasets have equal length

root = "/content/drive/MyDrive/Rohit/Human Pose Estimation/UTD MHAD/"
transform = transforms.Compose([
                                transforms.Resize((224,224)),
                                transforms.ToTensor(),
                                transforms.Normalize(mean, std)
                                ])
Dataset = CustomDataset(root+"angle/train", root+"anglevel/train", transform)

num_classes = 27

Inside the respective train folders, each class has several images.
Hope you will help me out, thanks in advance