Hi
I am trying to resize my images through transforms, but I get the error: “AttributeError: ‘Resize’ object has no attribute ‘resize’”
Here is my code:
class swe_dataset(Dataset):
def init(self, train, label,transform):
self.x_data=train
self.y_data=label
self.len = len(self.x_data)
self.transform=transform
#self.transform= transforms.Resize((120,120))
def __getitem__(self,index):
    sample= self.x_data[index], self.y_data[index]
    if self.transform is not None:
        sample=self.transform(sample)
        
    return sample

def __len__(self):
    return self.len

#######################################
class resize:
def call(self, sample):
inputs,targets = sample
inputs =transform.resize(inputs, (120, 120))
return inputs,targets
#######################################
train_set=swe_dataset(ts[0],tls[0],transform=resize())
#######################################
when I try to access the sample image by: im,_=next(iter(train_set)), I get the mentioned error. Could you help me to understand what is the problem in resizing? (because when I am not using transform everything works well)