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 notice that your code is throwing an error due to two reasons:
The way you load the datasets you should do like "./datasets" but you didn't use the dot for specifying the directory. train = datasets.MNIST(root="./datasets", train=True, transform=transforms.ToTensor(), download=True) test = datasets.MNIST(root="./datasets", train=False, transform=transforms.ToTensor(), download=True)
The forward function has an error def forward(self, x): x = self.fc1(x) x = F.relu(x) x = self.fc2(x) return x I hope this will help you to fix the issue
The text was updated successfully, but these errors were encountered:
I notice that your code is throwing an error due to two reasons:
train = datasets.MNIST(root="./datasets", train=True, transform=transforms.ToTensor(), download=True) test = datasets.MNIST(root="./datasets", train=False, transform=transforms.ToTensor(), download=True)
def forward(self, x): x = self.fc1(x) x = F.relu(x) x = self.fc2(x) return x I hope this will help you to fix the issue
The text was updated successfully, but these errors were encountered: