In your getitem code you change your image to a transform for some reason in this line
        image = transforms.ToTensor()

You cannot do this and that is probably why you are getting the error. You should just delete this line.