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

convolution parameter #13

Closed
rajendraranabhat opened this issue Jan 28, 2016 · 2 comments
Closed

convolution parameter #13

rajendraranabhat opened this issue Jan 28, 2016 · 2 comments

Comments

@rajendraranabhat
Copy link

Hi in your convolutional_network.ipynb file. Do you mind how you come with the number of 7_7_64 in
'wd1': tf.Variable(tf.random_normal([7_7_64, 1024])) . I am still confuse as how you are calculating this number. I think it is not arbitary number right?

@aymericdamien
Copy link
Owner

Yes, it is calculated based on the previous layer, to know total number of parameters. Basically, you have:
input: (28, 28, 1) Pictures of size 28x28 with 1 color channel (grayscale)
conv1, 32 filters, strides=1:
(28, 28, 32)
maxpool1, kernel_size=2:
(14, 14, 32)
conv2, 64 filters, strides=1:
(14, 14, 64)
maxpool2, kernel_size=2:
(7, 7, 64) => 7x7x64 outputs
(that we flatten to connect to a dense layer)
(3136)

For further understanding, you can have a look at http://cs231n.github.io/convolutional-networks/, it gives a good explanation and some examples.

@rajendraranabhat
Copy link
Author

Thankyou.

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