Answers.Body: <p>This depends on the engine you use, but in general, yes, of course.</p>
  <p>For example, in the <a href="https://www.tensorflow.org/api_docs/python/tf/keras/layers/Conv2D" rel="nofollow noreferrer">TensorFlow</a> height and width are separate variables, so nothing in your way to set one of them to 1 to have 1D data in it.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-17T22:26:50.417Z
Answers.LastActivityDate: 2021-09-17T22:26:50.417Z
Answers.UserDisplayName: Damir Tenishev
Answers.Body: <p>You can certainly <em>reshape</em> the data to make it fit a 2D network. You could set the width or height to 1 as suggested by DamirTenishev, but you could also set the <em>features</em>/<em>channels</em> to 1 and treat the features as a height, if you wanted to convolve that way (would be a bit strange).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-18T07:16:07.453Z
Answers.LastActivityDate: 2021-09-18T07:16:07.453Z
Answers.UserDisplayName: Criticize SE actions means ban
Body: <p>Suppose that I have a 1D dataset with 6 features.</p>
  <p>Can I apply a 2D convolutional neural net to this dataset?</p>
  
Tags: <convolutional-neural-networks><convolution>
Title: Is it possible to apply 2D convolution to 1D data?
UserDisplayName: user366312
ThreadText: # Is it possible to apply 2D convolution to 1D data?
  
  (Asked by: username_0 on 2021-09-17)
  
  Suppose that I have a 1D dataset with 6 features.
  
  Can I apply a 2D convolutional neural net to this dataset?
  
  **Tags:** convolutional-neural-networks, convolution
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2021-09-17. Score: 1 | Accepted answer
  
  This depends on the engine you use, but in general, yes, of course.
  
  For example, in the [TensorFlow](https://www.tensorflow.org/api_docs/python/tf/keras/layers/Conv2D) height and width are separate variables, so nothing in your way to set one of them to 1 to have 1D data in it.
  
  
  ---
  
  ### Answer by username_2 on 2021-09-18. Score: 0
  
  You can certainly *reshape* the data to make it fit a 2D network. You could set the width or height to 1 as suggested by DamirTenishev, but you could also set the *features*/*channels* to 1 and treat the features as a height, if you wanted to convolve that way (would be a bit strange).
  
  
  ---
  
  