Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forward function error #1

Open
abdoulayegk opened this issue May 22, 2021 · 1 comment
Open

forward function error #1

abdoulayegk opened this issue May 22, 2021 · 1 comment

Comments

@abdoulayegk
Copy link

I notice that your code is throwing an error due to two reasons:

  1. 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)
  2. 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
@martinmwas254
Copy link

Thanks Abdoulayegk ...,but i don't mind you teaching me more about python am just a beginner in python language

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants