I have a question and that is maybe because I have a misunderstanding. In CNN, the convolution layer uses different filters (kernels). Let's imagine I have a network with 81 nodes in the input layer (my images have a size of 9*9). The second layer is my convolution layer.
Now I want to use a kernel with a size of 3*3. I have here four questions:

  1. After using the kernel all over my image, the size of my image is reduced to 7*7. That means that the nodes of my first convolution layer should be at least 7*7. Is that correct?
  2. If the size of the convolution layer is much smaller e.g. 3*3 then the kernel has to slide e.g. with a slide size of 2. Is this correct?
  3. Then, also each node in the convolution layer should be just connected to 3*3 = 9 nodes of the input layer. Is that correct?
  4. As my kernel (here 3*3) has 9 constant weights, which you run on the input nodes, then the 9 input weights of each node in convolution layer should also have exactly the same 9 weights. (this image illustrates what I mean with the 9 weights). Is this correct?

If my mentioned assumptions are correct then I have this last question: I was reading this article about implementing CNN with keras. There it uses images with size of 28*28. But then he writes the following code for its first convolution layer of its CNN:

model.add(Conv2D(64, kernel_size=3, activation=’relu’, input_shape=(28,28,1)))  

I don't understand why he converts a 28*28 image to 64 nodes i.e. 8*8 image. Then the kernel of 3*3 must jump more about three pixel. Doesn't it loose much information? Many pixels are not even considered by the kernel.

  • $\begingroup$ Maybe you should read this article: cs231n.github.io/convolutional-networks. Also, you should ask one question per post, ideally, so that the post serves as a more general reference to that question (I would say). $\endgroup$ – nbro Feb 1 '19 at 18:28
  • $\begingroup$ @nbro I have readen the article and the watched the corresponding video. The question I have is after reading it. $\endgroup$ – Code Pope Feb 1 '19 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.