Answers.Body: <p>There are many resources that answer your question, but, given that you're apparently new to machine learning (ML), deep learning (DL), and neural networks (NN), let me provide a simple answer that should clarify your doubts.</p>
  <p>The term <strong>weight</strong> in the context of ML, DL, and NN is a synonym for <strong>parameter</strong> (sometimes, in some contexts, such as linear regression, it is also known as <strong>coefficient</strong>), which can be constant (i.e. do not change during, for example, learning/training) or learnable (i.e. change during the training/learning process). In a feedforward neural network (FFNN), with and without recurrent connections, the weights are the numbers on the connections between neurons in different or same layers. They are called <strong>weights</strong> to emphasize that their role is to weigh the effect of one neuron on the other.</p>
  <p>In a CNN, the weights are the kernels/filters of the CNN, i.e. the matrices that you use to perform the convolution (or cross-correlation) operation in a convolutional layer. So, given that CNNs perform an operation that seems to be different than the linear combination followed by the non-linear activation function in FFNNs, you could think that the weights in a CNN are not very similar to the weights in FFNNs. However, this is not fully true, as CNNs can be viewed as FFNNs (with some specific structure): maybe <a href="https://ai.stackexchange.com/a/18796/2444">this answer</a> will provide you more info about this topic. So, your notes are right!</p>
  <p>In my opinion, the best way to understand the role of the kernels (i.e. weights) of a CNN and all the details behind the convolution (or cross-correlation) operation is to first study some traditional computer vision and image processing techniques, so maybe you should pick a book that covers them.</p>
  <p>In <a href="https://ai.stackexchange.com/a/21967/2444">this answer</a>, I briefly try to describe what a CNN is and what it can be used for. There are other answers on this site, such as <a href="https://ai.stackexchange.com/q/21394/24445">this</a>, <a href="https://ai.stackexchange.com/q/12510/2444">this</a>, and <a href="https://ai.stackexchange.com/q/21999/2444">this</a>, which you may want to read, if not now later, to understand even more all the details of CNNs. A  decent reference book that covers CNNs (and other DL topics) is <a href="https://www.deeplearningbook.org/contents/convnets.html" rel="nofollow noreferrer">Deep Learning</a> by Ian Goodfellow et al.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-19T15:25:13.520Z
Answers.LastActivityDate: 2021-02-18T17:33:53.780Z
Answers.LastEditDate: 2021-02-18T17:33:53.780Z
Answers.UserDisplayName: nbro
Body: <p>Looking at some old notes I took on CNN's and I wrote down that the weights in a CNN are acting like filters in a CNN but to be honest I don't really know what the weights are acting as in a CNN and was wondering if someone could explain that clearly to me.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-09T15:20:02.547Z
Comments.Text: You asked me to re-open this post because you wanted to get a specific answer to your question, although this question is already although somehow implicitly answered in other posts. In any case, [if my answer below answers your question, you should accept it.](https://ai.stackexchange.com/help/someone-answers)
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-18T17:27:56.273Z
Comments.Text: hi @PlayerUnknown_12, check out [this minicourse about CNNs](https://www.youtube.com/watch?v=ArPaAX_PhIs&list=PLkDaE6sCZn6Gl29AoE31iwdVwSG-KnDzF) by Andrew Ng, if you're interested. I found it very helpful. Starting from second video he discusses how filters of CNNs can learn to detect edges of the objects in the images
Comments.UserDisplayName: mark mark
Tags: <convolutional-neural-networks><weights>
Title: What are acting as weights in a convolution neural network?
UserDisplayName: PlayerUnknown_12
ThreadText: # What are acting as weights in a convolution neural network?
  
  (Asked by: username_0 on 2021-01-18)
  
  Looking at some old notes I took on CNN's and I wrote down that the weights in a CNN are acting like filters in a CNN but to be honest I don't really know what the weights are acting as in a CNN and was wondering if someone could explain that clearly to me.
  
  **Tags:** convolutional-neural-networks, weights
  
  > **Comments:**
  > **username_1**: You asked me to re-open this post because you wanted to get a specific answer to your question, although this question is already although somehow implicitly answered in other posts. In any case, [if my answer below answers your question, you should accept it.](https://ai.stackexchange.com/help/someone-answers)  
  > **username_2**: hi @username_0, check out [this minicourse about CNNs](https://www.youtube.com/watch?v=ArPaAX_PhIs&list=PLkDaE6sCZn6Gl29AoE31iwdVwSG-KnDzF) by Andrew Ng, if you're interested. I found it very helpful. Starting from second video he discusses how filters of CNNs can learn to detect edges of the objects in the images  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-01-19. Score: 1
  
  There are many resources that answer your question, but, given that you're apparently new to machine learning (ML), deep learning (DL), and neural networks (NN), let me provide a simple answer that should clarify your doubts.
  
  The term **weight** in the context of ML, DL, and NN is a synonym for **parameter** (sometimes, in some contexts, such as linear regression, it is also known as **coefficient**), which can be constant (i.e. do not change during, for example, learning/training) or learnable (i.e. change during the training/learning process). In a feedforward neural network (FFNN), with and without recurrent connections, the weights are the numbers on the connections between neurons in different or same layers. They are called **weights** to emphasize that their role is to weigh the effect of one neuron on the other.
  
  In a CNN, the weights are the kernels/filters of the CNN, i.e. the matrices that you use to perform the convolution (or cross-correlation) operation in a convolutional layer. So, given that CNNs perform an operation that seems to be different than the linear combination followed by the non-linear activation function in FFNNs, you could think that the weights in a CNN are not very similar to the weights in FFNNs. However, this is not fully true, as CNNs can be viewed as FFNNs (with some specific structure): maybe [this answer](https://ai.stackexchange.com/a/18796/2444) will provide you more info about this topic. So, your notes are right!
  
  In my opinion, the best way to understand the role of the kernels (i.e. weights) of a CNN and all the details behind the convolution (or cross-correlation) operation is to first study some traditional computer vision and image processing techniques, so maybe you should pick a book that covers them.
  
  In [this answer](https://ai.stackexchange.com/a/21967/2444), I briefly try to describe what a CNN is and what it can be used for. There are other answers on this site, such as [this](https://ai.stackexchange.com/q/21394/24445), [this](https://ai.stackexchange.com/q/12510/2444), and [this](https://ai.stackexchange.com/q/21999/2444), which you may want to read, if not now later, to understand even more all the details of CNNs. A decent reference book that covers CNNs (and other DL topics) is [Deep Learning](https://www.deeplearningbook.org/contents/convnets.html) by Ian Goodfellow et al.
  
  
  ---
  
  