Your image seems to be a numpy array.
torchvision transformations work on PIL.Images, so either load the image directly via Image.open or convert it to a PIL.Image before passing it to the transformations.