Answers.Body: <p>If you think about it too much, there aren't neurons in <strong>any</strong> neural network. There are just weight matrices, and activation functions.</p>
  <p>In a traditional NN, we can take a each column of the weight matrix, combined with an application of the activation function, and call that a neuron.</p>
  <p>In a CNN, the same weight matrix is used over and over, many times. If you like, you can call each time it's used a separate neuron (all having the same weights) or you can call it the same neuron being used multiple times. It doesn't matter what you call it, though, since the point is the convolution itself.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-17T20:47:46.337Z
Answers.LastActivityDate: 2023-02-21T17:16:15.903Z
Answers.LastEditDate: 2023-02-21T17:16:15.903Z
Answers.UserDisplayName: Criticize SE actions means ban
Answers.Body: <p>There are no stupid questions :)</p>
  <p>As @MuhammadIkhwanPerwira pointed out, the pixels themselves can be thought of as &quot;neurons&quot;. His answer to your follow-up question is also valid: generally yes the pixels in the feature map can be thought of similarly to the neurons in the hidden layers of a fully-connected layer, but this analogy starts to break down a bit when you introduce channels.</p>
  <p>The key difference with classical (fully-connected neural nets) is that convolution enables parameter sharing, so you no longer have &quot;edges&quot; (parameters) connecting each input node to each output node, but rather you build each output node (pixel) by sliding your (parametrised) kernel across the input nodes (pixels).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-17T11:27:32.123Z
Answers.LastActivityDate: 2023-02-17T11:27:32.123Z
Answers.UserDisplayName: thesofakillers
Body: <p>This might be a stupid question, and I might have read too much about neural networks and CNNs today so my mind is a bit of a mess. But I get that neural networks contains neurons or nodes. They calculate a dot product and sends the output further into the network.</p>
  <p>But what about CNNs? The initial convolution layer will use a kernel convolution to go over the binary pixel data and calculate a dot product based on the weights in the kernel / filter, and the numbers from the binary pixel data.</p>
  <p>And after this we get a feature map, we can have several feature maps that find certain features or patterns, and we can pool and use other functions further on in the network to achieve certain predictions.</p>
  <p>But where are the neurons in the CNN? Aren't there &quot;just&quot; convolutional, pooling, flattened layers, and a final fully connected network?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-02-16T20:52:39.797Z
Comments.Text: In short, yes.  You may additionally have a bias being added.
Comments.UserDisplayName: David Hoelzer
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-02-16T21:17:02.093Z
Comments.Text: The pixels itself represent neurons.
Comments.UserDisplayName: Muhammad Ikhwan Perwira
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-02-16T21:32:25.900Z
Comments.Text: @MuhammadIkhwanPerwira So the pixel in the generated feature map represent one neuron, or what?
Comments.UserDisplayName: Krullmizter
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-02-16T21:37:01.833Z
Comments.Text: @Krullmizter Depends on the colorspace or color channel, if the image is grayscale, then 1 neuron represent 1 pixel because it only has 1 channel. Otherwise, such as Red Green Blue (RGB), 1 channel represent 1 neuron, that's mean 3 neurons for 1 pixel because the pixel has 3 channels (RGB).
Comments.UserDisplayName: Muhammad Ikhwan Perwira
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-02-16T23:41:46.663Z
Comments.Text: https://stats.stackexchange.com/a/409172/247274
Comments.UserDisplayName: Dave
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-02-20T11:22:42.803Z
Comments.Text: Does this answer your question? [Can neurons in MLP and filters in CNN be compared?](https://ai.stackexchange.com/questions/18785/can-neurons-in-mlp-and-filters-in-cnn-be-compared) I believe this is a duplicate of the linked question or at least the answers there (one of them is mine) should answer your question, so you should mark this as a duplicate
Comments.UserDisplayName: nbro
Tags: <convolutional-neural-networks>
Title: Are there neurons in CNNs?
UserDisplayName: Krullmizter
ThreadText: # Are there neurons in CNNs?
  
  (Asked by: username_0 on 2023-02-16)
  
  This might be a stupid question, and I might have read too much about neural networks and CNNs today so my mind is a bit of a mess. But I get that neural networks contains neurons or nodes. They calculate a dot product and sends the output further into the network.
  
  But what about CNNs? The initial convolution layer will use a kernel convolution to go over the binary pixel data and calculate a dot product based on the weights in the kernel / filter, and the numbers from the binary pixel data.
  
  And after this we get a feature map, we can have several feature maps that find certain features or patterns, and we can pool and use other functions further on in the network to achieve certain predictions.
  
  But where are the neurons in the CNN? Aren't there "just" convolutional, pooling, flattened layers, and a final fully connected network?
  
  **Tags:** convolutional-neural-networks
  > **Comments:**
  > **username_1**: In short, yes.  You may additionally have a bias being added.  
  > **username_2**: The pixels itself represent neurons.  
  > **username_0**: @MuhammadIkhwanPerwira So the pixel in the generated feature map represent one neuron, or what?  
  > **username_2**: @Krullmizter Depends on the colorspace or color channel, if the image is grayscale, then 1 neuron represent 1 pixel because it only has 1 channel. Otherwise, such as Red Green Blue (RGB), 1 channel represent 1 neuron, that's mean 3 neurons for 1 pixel because the pixel has 3 channels (RGB).  
  > **username_3**: https://stats.stackexchange.com/a/409172/247274  
  > **username_4**: Does this answer your question? [Can neurons in MLP and filters in CNN be compared?](https://ai.stackexchange.com/questions/18785/can-neurons-in-mlp-and-filters-in-cnn-be-compared) I believe this is a duplicate of the linked question or at least the answers there (one of them is mine) should answer your question, so you should mark this as a duplicate  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_6 on 2023-02-17. Score: 5 | Accepted answer
  
  There are no stupid questions :)
  
  As @MuhammadIkhwanPerwira pointed out, the pixels themselves can be thought of as "neurons". His answer to your follow-up question is also valid: generally yes the pixels in the feature map can be thought of similarly to the neurons in the hidden layers of a fully-connected layer, but this analogy starts to break down a bit when you introduce channels.
  
  The key difference with classical (fully-connected neural nets) is that convolution enables parameter sharing, so you no longer have "edges" (parameters) connecting each input node to each output node, but rather you build each output node (pixel) by sliding your (parametrised) kernel across the input nodes (pixels).
  
  
  ---
  
  ### Answer by username_5 on 2023-02-17. Score: 2
  
  If you think about it too much, there aren't neurons in **any** neural network. There are just weight matrices, and activation functions.
  
  In a traditional NN, we can take a each column of the weight matrix, combined with an application of the activation function, and call that a neuron.
  
  In a CNN, the same weight matrix is used over and over, many times. If you like, you can call each time it's used a separate neuron (all having the same weights) or you can call it the same neuron being used multiple times. It doesn't matter what you call it, though, since the point is the convolution itself.
  
  
  ---
  
  