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

Maybe there is an error in Question 4 Chapter 10 #16

Closed
danli349 opened this issue Jan 1, 2025 · 2 comments · Fixed by #17
Closed

Maybe there is an error in Question 4 Chapter 10 #16

danli349 opened this issue Jan 1, 2025 · 2 comments · Fixed by #17
Assignees

Comments

@danli349
Copy link

danli349 commented Jan 1, 2025

"Consider a CNN that takes in 32×32 grayscale images and has a single convolution layer with three 5×5 convolution filters (without boundary padding)", if without boundary padding, the first convolution layer should be 3@28×28, I don't understand why the answer is 5@32×32?

"(b) How many parameters are in this model?" 5×5×3+3=78
"(d) If there were no constraints, then how many weights would there be in the ordinary feed-forward neural network in (c)?"
If the convolution layer still 32×32, then the parameters should be (32×32+1)×32×32×3 = 3148800, each pixel in the convolution layer should have a bias, I am not sure am I correct?

@danhalligan
Copy link
Owner

There's definitely some errors here I think. Hard to know what I was thinking at the time, but I think 3 vs 5 layers is just a mis-read of the question from me and 32x32 pixels I think is also an error (I hadn't considered the boundary padding issue). This means my calculation of the number of parameters (part b) is wrong and I agree with you it should be 78.

For part d, I think you're correct, but might need a bit of time to convince myself (with the adjustment for 32 -> 28 pixels from the above error).

I'll try and update when I get chance

@danhalligan danhalligan self-assigned this Jan 2, 2025
@danhalligan danhalligan linked a pull request Jan 2, 2025 that will close this issue
@danhalligan
Copy link
Owner

Thanks @danli349 for another good spot! Hopefully fixed now.

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

Successfully merging a pull request may close this issue.

2 participants