Answers.Body: <p>Channels can be thought of as alternate numbers in the same space.</p>
  <p>As an example, the three colour channels of a typical image are often values for amount of red, green or blue light received from each position within the picture.</p>
  <p>Your 1D convolution example has one input channel and one output channel. Depending on what the input represents, you might have additional input channels representing other values measured in the same input space. For all but the most simple problems, you will have multiple output channels. The number of channels in each layer may vary, similarly to how the size of hidden layers in a fully connected neural network can vary.</p>
  <p>The term &quot;feature map&quot; means the same as channel, and is typically used to describe the outputs of hidden layers.</p>
  <p>To map from N input channels to M output channels requires <span class="math-container">$N \times M$</span> filters. Each of the M outputs is connected by a filter to each of the N inputs, and the results of running those N convolutions is summed and passed through a nonlinear activation function to generate an output channel.</p>
  <p>Although in the abstract, a channel is a type of dimension, channels are considered as entirely separate to the space which is being processed. So adding channels to your 1D example does not make it a 2D convolutional neural network.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-30T11:50:54.890Z
Answers.Text: In NLP, the channels are the word vector (embedding) dimensions.
Answers.UserDisplayName: hobs
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-22T01:47:49.210Z
Answers.Text: Then a 1x1 convolution just calculates de summation of all channels values at every pixel? Or does it something more complex such as weighted summation and it calculates the best weights as parameters for the model?
Answers.UserDisplayName: skan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-22T08:13:36.607Z
Answers.Text: @skan it's a weighted sum with nonlinear filter, over all channels, and separately for each pixel
Answers.UserDisplayName: Neil Slater
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-22T12:31:51.343Z
Answers.Text: @NeilSlater How does it calculate the weights?
Answers.UserDisplayName: skan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-22T13:15:28.447Z
Answers.Text: @skan they are normal NN weights, learned along with the rest during training. The only difference is the architecture has been deliberately chosen to adjust the channel count, and nothing else for that layer
Answers.UserDisplayName: Neil Slater
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-22T13:17:50.357Z
Answers.Text: @skan this question and answer are not about 1x1 convolutions. If you have any further questions please ask as a new question on the site
Answers.UserDisplayName: Neil Slater
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-30T10:02:35.353Z
Answers.LastActivityDate: 2021-07-30T10:02:35.353Z
Answers.UserDisplayName: Neil Slater
Answers.Body: <p>A common use case for 1d-convolution is to analyse &amp; interpret time series data. Imagine a single sensor that generates a sequence of readings such as <code>[1 2 3 4 2]</code>.</p>
  <p>That is equivalent to a single channel.</p>
  <p>However its also possible to have multiple sensors generating readings, such as</p>
  <pre><code>[ 1 2 3 2 4]
  [ 2 3 4 1 2]
  [ 3 4 5 1 2]
  </code></pre>
  <p>This would be equivalent to 3 channels of time series data that's consumed by a 1d convolution.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-14T05:40:34.187Z
Answers.LastActivityDate: 2022-09-14T05:40:34.187Z
Answers.UserDisplayName: shark8me
Body: <p>While reading about <a href="https://pytorch.org/docs/stable/generated/torch.nn.Conv1d.html" rel="nofollow noreferrer">1D-convolutions in PyTorch</a>, I encountered the concept of <code>channels</code>.</p>
  <pre><code>in_channels (int) – Number of channels in the input image
  
  out_channels (int) – Number of channels produced by the convolution
  </code></pre>
  <p>Although I encountered this concept of channels earlier, I am confused about channels and might understand them in the wrong manner.</p>
  <p>Since the operation we are discussing is a 1D convolution, then there will be two lists of numbers: one is the input list and the other is the filter list. The last one is the feature map (the output list).</p>
  <p>They look like this:</p>
  <p><a href="https://i.sstatic.net/WNIXd.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/WNIXd.png" alt="1-D convolution" /></a></p>
  <p>The left one is the input list, the middle one is the filter list and the rightmost one is the output list.</p>
  <p>Each cell in the input list contains a whole number. Each cell may take a value in the fixed range <span class="math-container">$[a, b]$</span> of numbers.</p>
  <p><strong>What is the concept of channels used here? From where the channels are coming? Does the number of channels stand for the number of elements in the corresponding list?</strong></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-07-23T06:08:59.733Z
Comments.Text: try these two:
  - https://datascience.stackexchange.com/questions/54007/what-are-the-input-and-output-channels-of-a-convolution-in-pytorch
  - https://stackoverflow.com/questions/56652204/pytorch-convolution-in-channels-and-out-channels-meaning
Comments.UserDisplayName: redhqs
Tags: <terminology><image-processing><convolution><1d-convolution><channel>
Title: What does 'channel' mean in the case of an 1D convolution?
UserDisplayName: hanugm
ThreadText: # What does 'channel' mean in the case of an 1D convolution?
  
  (Asked by: username_0 on 2021-07-21)
  
  While reading about [1D-convolutions in PyTorch](https://pytorch.org/docs/stable/generated/torch.nn.Conv1d.html), I encountered the concept of `channels`.
  
  ```
  in_channels (int) – Number of channels in the input image
  
  out_channels (int) – Number of channels produced by the convolution
  
  ```
  
  Although I encountered this concept of channels earlier, I am confused about channels and might understand them in the wrong manner.
  
  Since the operation we are discussing is a 1D convolution, then there will be two lists of numbers: one is the input list and the other is the filter list. The last one is the feature map (the output list).
  
  They look like this:
  
  [![1-D convolution](https://i.sstatic.net/WNIXd.png)](https://i.sstatic.net/WNIXd.png)
  
  The left one is the input list, the middle one is the filter list and the rightmost one is the output list.
  
  Each cell in the input list contains a whole number. Each cell may take a value in the fixed range $[a, b]$ of numbers.
  
  **What is the concept of channels used here? From where the channels are coming? Does the number of channels stand for the number of elements in the corresponding list?**
  
  **Tags:** terminology, image-processing, convolution, 1d-convolution, channel
  
  > **Comments:**
  > **username_1**: try these two: - https://datascience.stackexchange.com/questions/54007/what-are-the-input-and-output-channels-of-a-convolution-in-pytorch - https://stackoverflow.com/questions/56652204/pytorch-convolution-in-channels-and-out-channels-meaning  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2021-07-30. Score: 1 | Accepted answer
  
  Channels can be thought of as alternate numbers in the same space.
  
  As an example, the three colour channels of a typical image are often values for amount of red, green or blue light received from each position within the picture.
  
  Your 1D convolution example has one input channel and one output channel. Depending on what the input represents, you might have additional input channels representing other values measured in the same input space. For all but the most simple problems, you will have multiple output channels. The number of channels in each layer may vary, similarly to how the size of hidden layers in a fully connected neural network can vary.
  
  The term "feature map" means the same as channel, and is typically used to describe the outputs of hidden layers.
  
  To map from N input channels to M output channels requires $N \times M$ filters. Each of the M outputs is connected by a filter to each of the N inputs, and the results of running those N convolutions is summed and passed through a nonlinear activation function to generate an output channel.
  
  Although in the abstract, a channel is a type of dimension, channels are considered as entirely separate to the space which is being processed. So adding channels to your 1D example does not make it a 2D convolutional neural network.
  
  > **Comments:**
  > **username_3**: In NLP, the channels are the word vector (embedding) dimensions.  
  > **username_4**: Then a 1x1 convolution just calculates de summation of all channels values at every pixel? Or does it something more complex such as weighted summation and it calculates the best weights as parameters for the model?  
  > **username_2**: @username_4 it's a weighted sum with nonlinear filter, over all channels, and separately for each pixel  
  > **username_4**: @username_2 How does it calculate the weights?  
  > **username_2**: @username_4 they are normal NN weights, learned along with the rest during training. The only difference is the architecture has been deliberately chosen to adjust the channel count, and nothing else for that layer  
  > **username_2**: @username_4 this question and answer are not about 1x1 convolutions. If you have any further questions please ask as a new question on the site  
  
  ---
  
  ### Answer by username_5 on 2022-09-14. Score: 0
  
  A common use case for 1d-convolution is to analyse & interpret time series data. Imagine a single sensor that generates a sequence of readings such as `[1 2 3 4 2]`.
  
  That is equivalent to a single channel.
  
  However its also possible to have multiple sensors generating readings, such as
  
  ```
  [ 1 2 3 2 4]
  [ 2 3 4 1 2]
  [ 3 4 5 1 2]
  
  ```
  
  This would be equivalent to 3 channels of time series data that's consumed by a 1d convolution.
  
  
  ---
  
  