原代码
fashion_train = torchvision.datasets.FashionMNIST(root='../FashionMNIST',train=True,
transform=transforms.ToTensor,download=False)
fashion_test = torchvision.datasets.FashionMNIST(root='../FashionMNIST',train=True,
download=False,transform=transforms.ToTensor)
fashion_train_iter = Data.DataLoader(fashion_train,batch_size=256,shuffle=True)
fashion_test_iter = Data.DataLoader(fashion_test,batch_size=256,shuffle=False)
这一部分出现TypeError: object() takes no parameters错,原因是transforms.ToTensor应该加括号
fashion_train = torchvision.datasets.FashionMNIST(root='../FashionMNIST',train=True,
transform=transforms.ToTensor(),download=False)
fashion_test = torchvision.datasets.FashionMNIST(root='../FashionMNIST',train=True,
download=False,transform=transforms.ToTensor())