Hi:)
I am trying to iterate over pictures from folder, using PIL.Image to open and resize them, and then torchvision.transforms.ToTensor() to save them as tensors.
On the ToTensor() command  I get this error:
TypeError: array() takes 1 positional argument but 2 were given
# read from given dir, resize to imageSizeXimageSize
def readImages(dir, imageSize): 
    # process one given raw image
    def processImg(rawImg):
        image = Image.open(rawImg)
        image.thumbnail((imageSize, imageSize), Image.ANTIALIAS)
        image = image.resize((imageSize, imageSize), Image.ANTIALIAS)
        image = torchvision.transforms.ToTensor()(image)
        return image

    images = []
    for rawImg in (Path(dir).glob('*.png')):
        images.append(processImg(rawImg))
    return images

someone help?