Skip to content

Wrong designed network for depicted model on PyTorch 60-Minute Blitz #877

Closed
@javadr

Description

@javadr

At first, I would like to express my great appreciation to those who created such a nice package with a great manual specially @brianjo for making PyTorch 60-Minute Blitz.

While I was reading this page, I confused with the code that didn't match the illustrated model.
The page started with a model network and then tried to implement it via PyTorch.
But there are subtle typos in it. (I named it typo because I'm sure the one who made it is an expert)
Both conv1 and conv2 in the code must have kernel_size=5 not 3 in compliance with shown model at the beginning of the article -- the correction is here:

self.conv1 = nn.Conv2d(1, 6, 5)
self.conv2 = nn.Conv2d(6, 16, 5)
# an affine operation: y = Wx + b
self.fc1 = nn.Linear(16 * 5 * 5, 120)  # 5*5 from image dimension

https://github.com/pytorch/tutorials/blob/master/beginner_source/blitz/neural_networks_tutorial.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions