You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got the error: output with shape [1, 28, 28] doesn't match the broadcast shape [3, 28, 28]
because of this code:
for batch_idx, (x, _) in enumerate(train_loader)
we should change the transform code for mnist dataset:
ERROR
transform = transforms.Compose([
transforms.ToTensor(),
transforms.Normalize(mean=(0.5, 0.5, 0.5), std=(0.5, 0.5, 0.5))])
Right
transform = transforms.Compose([
transforms.ToTensor(),
transforms.Normalize([0.5], [0.5])
])
The text was updated successfully, but these errors were encountered:
I got the error: output with shape [1, 28, 28] doesn't match the broadcast shape [3, 28, 28]
because of this code:
for batch_idx, (x, _) in enumerate(train_loader)
we should change the transform code for mnist dataset:
ERROR
transform = transforms.Compose([
transforms.ToTensor(),
transforms.Normalize(mean=(0.5, 0.5, 0.5), std=(0.5, 0.5, 0.5))])
Right
transform = transforms.Compose([
transforms.ToTensor(),
transforms.Normalize([0.5], [0.5])
])
The text was updated successfully, but these errors were encountered: