Skip to content

Fix kernel dimensions for LeNet model code example #2192

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

Merged
merged 6 commits into from
Feb 14, 2023

Conversation

kiersten-stokes
Copy link
Contributor

@kiersten-stokes kiersten-stokes commented Feb 6, 2023

Fixes #2104

In going through the YouTube Intro tutorial, I noticed that the dimensions in the LeNet diagram don't match up with code that immediately follows it. Namely, the kernel size should be 5x5 rather than the 3x3 that's given. (And I believe the same should be true for the second convolutional layer?) While not really necessary for the point the tutorial is making, it may reduce confusion for those with no experience with this model (myself included 😄). Especially when comparing with the same network in this blitz tutorial that has the correct kernel size.

cc @suraj813

Signed-off-by: Kiersten Stokes <kierstenstokes@gmail.com>
@netlify
Copy link

netlify bot commented Feb 6, 2023

Deploy Preview for pytorch-tutorials-preview ready!

Name Link
🔨 Latest commit 2bdcb35
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-tutorials-preview/deploys/63ea6a31261e8c00077d0cec
😎 Deploy Preview https://deploy-preview-2192--pytorch-tutorials-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@kiersten-stokes
Copy link
Contributor Author

I'm just realizing that there's already an open issue for this: #2104. Apologies if I didn't give enough time for the issue's author to open a PR for it

@svekars svekars added the intro label Feb 6, 2023
@svekars
Copy link
Contributor

svekars commented Feb 6, 2023

@suraj813 can you please take a look? Thanks!

@subramen subramen self-requested a review February 13, 2023 15:37
Copy link
Contributor

@subramen subramen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kiersten-stokes thanks for fixing this!

@svekars svekars merged commit e5176b6 into pytorch:main Feb 14, 2023
svekars pushed a commit to mthrok/tutorials that referenced this pull request Feb 14, 2023
* Change kernel to 5x5 in  1st Conv2d layer in model init

Signed-off-by: Kiersten Stokes <kierstenstokes@gmail.com>

* Change kernel to 5x5 in 2nd Conv2d layer in model init

* Fix dimensions of 1st Linear layer to match new expected size
---------
Signed-off-by: Kiersten Stokes <kierstenstokes@gmail.com>
Co-authored-by: Suraj Subramanian <5676233+suraj813@users.noreply.github.com>
Co-authored-by: Svetlana Karslioglu <svekars@fb.com>
svekars pushed a commit that referenced this pull request Mar 31, 2023
* Change kernel to 5x5 in  1st Conv2d layer in model init

Signed-off-by: Kiersten Stokes <kierstenstokes@gmail.com>

* Change kernel to 5x5 in 2nd Conv2d layer in model init

* Fix dimensions of 1st Linear layer to match new expected size

---------

Signed-off-by: Kiersten Stokes <kierstenstokes@gmail.com>
Co-authored-by: Suraj Subramanian <5676233+suraj813@users.noreply.github.com>
Co-authored-by: Svetlana Karslioglu <svekars@fb.com>
malfet added a commit that referenced this pull request Apr 11, 2023
)

* Fix kernel dimensions for LeNet model code example (#2192)

* Change kernel to 5x5 in  1st Conv2d layer in model init

Signed-off-by: Kiersten Stokes <kierstenstokes@gmail.com>

* Change kernel to 5x5 in 2nd Conv2d layer in model init

* Fix dimensions of 1st Linear layer to match new expected size

---------

Signed-off-by: Kiersten Stokes <kierstenstokes@gmail.com>
Co-authored-by: Suraj Subramanian <5676233+suraj813@users.noreply.github.com>
Co-authored-by: Svetlana Karslioglu <svekars@fb.com>

* Update pyspelling for all beginner tutorials in Python

* Update

* Update

* Fix template tutorial, update gitignore

* Apply suggestions from code review

---------

Signed-off-by: Kiersten Stokes <kierstenstokes@gmail.com>
Co-authored-by: Kiersten Stokes <kierstenstokes@gmail.com>
Co-authored-by: Suraj Subramanian <5676233+suraj813@users.noreply.github.com>
Co-authored-by: Nikita Shulga <nshulga@meta.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect dimension in Figure: LeNet-5
4 participants