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

Multi-class Classification (02_pytorch_classification.ipynb) #741

Open
sascharo opened this issue Dec 2, 2023 · 1 comment
Open

Multi-class Classification (02_pytorch_classification.ipynb) #741

sascharo opened this issue Dec 2, 2023 · 1 comment

Comments

@sascharo
Copy link

sascharo commented Dec 2, 2023

The multi-class model coded in section 93 does a surprisingly good job even without any training, and even better without nn.ReLU. No matter the seed used for initialization, at epoch 0, the test accuracy is always above 70%. Why is that? I can't get it down to about 50%. I observed that in the notebook I coded along, but it's the same in the notebook from your repository.

@nickyreinert
Copy link

nickyreinert commented Dec 19, 2023

It must be something with the order of the code, I suggest to do a clean copy to your own notebook, see my example. For the sake of explanation, with the flow of Daniels video, the notebook is pretty good, but if you start experimenting, you quickly get lost in all those cells.

https://drive.google.com/file/d/13Qga2nDtXIXcvl3_vKXmNNJJB80MMGmO/view?usp=drive_link

When I decrease the learning rate, I can clearly see how the accuracy goes up from below 20 to 100%:

image

What you also could try is to make the data set more difficult. Increase the center_std to 4 or so. Now you clearly can see how the model is struggeling:

image

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