In your functional approach you are unpacking sample to inputs and target, thus passing a tensor to resize, while you are trying to apply self.transform on the tuple directly, which won’t work.
Unpack sample or pass self.x_data[index] directly to self.transform.