I have been getting this odd error saying that I have passes too many arguments into my call() method. I am thoroughly perplexed because I am sure I have only passes 2 arguments.
Here is my Compose class:
class Compose(object): def __init__(self, transforms): self.transforms = transforms def __call__(self, image, target): for t in self.transforms: image, target = t(image, target) return image, target
Here’s the function that is call the method:
def get_transform(train): transforms =  transforms.append(T.ToTensor()) if train: # during training, randomly flip the training images # and ground-truth for data augmentation transforms.append(T.RandomHorizontalFlip(0.5)) transforms.append(T.Resize(INPUT_SIZE)) return T.Compose(transforms)
Here’s the error msg:
Any help would be appreciated! <3