def __call__(self, x, y):
if y is not None:
for t in self.transforms:
x, y = t(x, y)
return x, y
else:
for t in self.transforms:
After Change
def __call__(self, *inputs):
for transform in self.transforms:
if not isinstance(inputs, (list,tuple)):
inputs = [inputs]inputs = transform(*inputs)
return inputs
class ToTensor(object):