L1aoXingyu / pytorch-beginner

pytorch tutorial for beginners
3k stars 1.09k forks source link

AutoEncoder一节中的transform错误 #33

Closed tanjuntao closed 4 years ago

tanjuntao commented 4 years ago
img_transform = transforms.Compose([
    transforms.ToTensor(),
    transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
])

这里有问题,我按照别人其他代码里面的transform改成下面这样可以跑

img_transform= transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.1307,), (0.3081,))])
LeiWang1999 commented 4 years ago

Yes, 我提了个PR,已经合并了。