Answers.Body: <p>A 2D convolution is a convolution where the kernel has the same depth as the input, so, in theory, you do not need to specify the depth of the kernel, if you know the depth of the input.</p>
  <p>I don't know which library you are referring to (although you tagged your post with TensorFlow and Keras), but, in TensorFlow, you only need to specify the <em>width</em> and <em>height</em> of the kernel in the <a href="https://www.tensorflow.org/api_docs/python/tf/keras/layers/Conv2D" rel="nofollow noreferrer"><code>Conv2D</code></a> class, given that the depth is automatically calculated from the depth of the input.</p>
  <p>Thus, the <span class="math-container">$2$</span> comes from the fact that you slide across two dimensions (i.e. width and height).</p>
  <p>On the other hand, in a 3D convolution, the depth of the kernel does not necessarily have the same depth of the input, so, in that case, you also slide across the depth. In TensorFlow, you need to specify the width, height and depth of the <a href="https://www.tensorflow.org/api_docs/python/tf/keras/layers/Conv3D" rel="nofollow noreferrer"><code>Conv3D</code></a> class.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-21T12:02:32.007Z
Answers.LastActivityDate: 2020-08-21T12:02:32.007Z
Answers.UserDisplayName: nbro
Body: <p>When I build a convolution layer for image processing, the filter parameters should have 3 dimensions, <code>(filter_length, filter_width, color_depth)</code> is that correct?</p>
  <p>Why is this convolution layer called <code>Conv2D</code>? Where does the <code>2</code> come from?</p>
  
Tags: <convolutional-neural-networks><terminology><tensorflow><keras><2d-convolution>
Title: Why is the convolution layer called Conv2D?
UserDisplayName: o_yeah
ThreadText: # Why is the convolution layer called Conv2D?
  
  (Asked by: username_0 on 2020-08-20)
  
  When I build a convolution layer for image processing, the filter parameters should have 3 dimensions, `(filter_length, filter_width, color_depth)` is that correct?
  
  Why is this convolution layer called `Conv2D`? Where does the `2` come from?
  
  **Tags:** convolutional-neural-networks, terminology, tensorflow, keras, 2d-convolution
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-08-21. Score: 2
  
  A 2D convolution is a convolution where the kernel has the same depth as the input, so, in theory, you do not need to specify the depth of the kernel, if you know the depth of the input.
  
  I don't know which library you are referring to (although you tagged your post with TensorFlow and Keras), but, in TensorFlow, you only need to specify the *width* and *height* of the kernel in the [`Conv2D`](https://www.tensorflow.org/api_docs/python/tf/keras/layers/Conv2D) class, given that the depth is automatically calculated from the depth of the input.
  
  Thus, the $2$ comes from the fact that you slide across two dimensions (i.e. width and height).
  
  On the other hand, in a 3D convolution, the depth of the kernel does not necessarily have the same depth of the input, so, in that case, you also slide across the depth. In TensorFlow, you need to specify the width, height and depth of the [`Conv3D`](https://www.tensorflow.org/api_docs/python/tf/keras/layers/Conv3D) class.
  
  
  ---
  
  