Maybe you inherit wrong things. You’re inheriting torch.utils.data.dataset which is a file ( dataset.py in folder data). You should inherit from a class, in this case is class Dataset.
This following code should work:
import os
from PIL import Image
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms, utils
import pandas as pd

transformer = transforms.Compose([
    transforms.CenterCrop((590,730)),
    transforms.Resize(448),
    transforms.Grayscale(3),
    transforms.ToTensor(), #Convert a PIL image or numpy.array to tensor and normalize in range[0.0, 1.0]
    transforms.Normalize(mean = (0.5, 0.5, 0.5), std = (0.5, 0.5, 0.5))

class MixDataset(Dataset):
    def __init__(self,image_root,image_attribute,TrainOrValid='Train'):
        # imgs = os.listdir(root)
        # imgs_id = [os.path.splitext(i)[0] for i in imgs]
        imgs = [i+'.jpg' for i in image_attribute['UltrasoundImageID']]
        self.labels = [i for i in image_attribute[['TypeOfPlaque_1', 'TypeOfPlaque_2', 'TypeOfPlaque_3', 'TypeOfPlaque_4']]]
        self.imgs_fullpath = [os.path.join(image_root,i) for i in imgs]
        self.transforms = transformer
        self.image_attributes = image_attribute

    def __getitem__(self, index):
        img_fullpath = self.imgs_fullpath[index]
        pil_img = Image.open(img_fullpath)
        img = self.transforms(pil_img)
        label = self.labels[index]
        return img, label

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


you can consult Custom DataLoader 25