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

Small confusion about convolution operator #49

Closed
atinesh-s opened this issue Sep 10, 2017 · 2 comments
Closed

Small confusion about convolution operator #49

atinesh-s opened this issue Sep 10, 2017 · 2 comments

Comments

@atinesh-s
Copy link

atinesh-s commented Sep 10, 2017

Small confusion about how convolution is applied in
"TensorFlow-Tutorials/02_Convolutional_Neural_Network.ipynb"

Layer 1

28*28(1) -> Convolution (# Filters =16) -> 28*28(16) -> Max Pooling -> 14*14(16) -> Relu -> 14*14(16)

Layer 2

14*14(16) -> Convolution (# Filters =36) -> ? -> Max Pooling -> 7*7(36) -> Relu -> 7*7(36)

As in Layer 1 If we give an i/p of size 28*28 to the convolution (with 16 filters) then we have 16 Output of size 28*28 as each filter is applied on the i/p image. Now in Layer 2 If we give 16 i/p of size 14*14 to the convolution (with 36 filters) then we should have 16*36=576 Output of size 14*14 as each filter is applied on every i/p image, But according to this final o/p of Layer 2 will be different. Can anybody tell me how conv2d is applied in the second layer.

@Hvass-Labs
Copy link
Owner

Thanks for taking the time to write a clear question. However, I think it has been more than a year since I did the video so I honestly can't remember the details of the tutorial. You do ask for anybody to help you, but I think it is unlikely that anyone will answer as it is mostly only me who responds to issues here, so I've closed the issue again. You could try writing this as a comment to the video on YouTube and see if anyone can help you there.

What may also be helpful is to add a lot of print-statements so you can see the shape of the tensors that are being sent through the neural network.

In general I can say that the convolution operator is a bit tricky to understand for multi-channel inputs. Perhaps it may be helpful to watch the video a second time? As I recall, there is a part that discusses the convolution for multi-channel inputs.

@atinesh-s
Copy link
Author

I can understand with time It becomes difficult to keep track of minute details. I was just asking for a simple intuitive explanation, not rigor details. By the way, I have posted it on Facebook lets see.

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