PyTorch DatasetLoader tensor should be a torch tensor. Got <class ‘PIL.Image.Image‘>报错

transforms.Normalize([0.5,],[0.5,]),
 transforms.ToTensor()

问题出在上方代码,normalize要在totensor之后才行

你可能感兴趣的:(pytorch,深度学习,人工智能)