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

Clarify why there are 6 output channels #790

Closed
jlin27 opened this issue Dec 16, 2019 · 4 comments
Closed

Clarify why there are 6 output channels #790

jlin27 opened this issue Dec 16, 2019 · 4 comments
Labels
60_min_blitz Cleanups for the 60 min blitz tutorial:https://pytorch.org/tutorials/beginner/deep_learning_60min_b

Comments

@jlin27
Copy link
Contributor

jlin27 commented Dec 16, 2019

In the Define the network section of the Neural Network tutorial, clarify why is it 6 outputs? Is it bias?

image

@jlin27 jlin27 added the 60_min_blitz Cleanups for the 60 min blitz tutorial:https://pytorch.org/tutorials/beginner/deep_learning_60min_b label Dec 16, 2019
@JonathanSum
Copy link

JonathanSum commented Jan 5, 2020

Right, I remember what I was taught in deeplearn.ai's video on coursera. that 6 output is not the bias. When we are doing on CNN, like VGG for example, we have to decrease the size of the image and increase the size of the channel to extract the feature. VGG model uses these all the time. I hope we have more technical people come here to explain more because I think I am not quite right. However, if you want to see that video, I can post the link of it.

@parmarsuraj99
Copy link

6 output channels are the numbers of filters or kernels which will be applied to the input image (of Height x Width x 1 dimensions), So We want out model to learn some different local relations between pixels (let's say in a region of 3x3) that are not obvious for us. So we want to increase the channels (filters/ kernels) and by applying 3x3 kernels, we decrease the Height and Width of further layers. That's what convolution layers do.
We can expect that model might have learned enough local relations between the layers and after some layers these local (spatial) relation will be given to a bigger channel (i.e. 16 nn.Conv2d(6, 16, 3)) that can represent entire picture in a spatially squeezed but with more channels. Then Flattening and FullyConnectedNet or GlobalAveragePooling layers can be applied.
This is a way of encoding image into a more learnable extracted format to do operations on it

Checkout these resources
https://brohrer.github.io/how_convolutional_neural_networks_work.html

For Visualization
https://www.cs.ryerson.ca/~aharley/vis/conv/flat.html
image

@boulabiar
Copy link

boulabiar commented Feb 20, 2020

Looks like a typo bug
Next in the tutorial it's 5x5
https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html

Patch is here #859

@jlin27
Copy link
Contributor Author

jlin27 commented May 18, 2020

Addressed in recipe

@jlin27 jlin27 closed this as completed May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
60_min_blitz Cleanups for the 60 min blitz tutorial:https://pytorch.org/tutorials/beginner/deep_learning_60min_b
Projects
None yet
Development

No branches or pull requests

4 participants