I am attempting to take up this dataset ImageFolder… and my model expects a Tensor instead of the raw PNG Binary… but when I attempt to add the transform.ToTensor I get an error
    testing_dataset = ImageFolder(root=data_conf["demo_in_image_dir"], transform=transforms.Compose([transforms.ToTensor]))

error
  File "/home/emcp/anaconda3/envs/pytorch_150/lib/python3.7/site-packages/torchvision/transforms/transforms.py", line 61, in __call__
    img = t(img)
TypeError: ToTensor() takes no arguments

EDIT:
I found the solution, seems I need to call toTensor()

  
    
    
    torchvision.transforms.ToTensor(img) not working 
  
  
    imgTensor = torchvision.transforms.ToTensor(img) 
TypeError: object() takes no parameters 
getting this issue, but when I checked the documentation the function is suppose to use image as a parameter