Can CNN be used for non-2D problems?



NOTE: Question asked by Anna Huris here

Can CNN be used for non-2D problem such as a general regression
problem(one Y and many X)? If so, could you provide an example code?


Hi Anna,

It would be great if you could elaborate what do you mean by “non-2D problems” and “general regression” ones.

I would attempt to answer with the details you have provided.

CNN (Convolutional Neural Network) does work for regression problems. For example, if you want to detect where in an image a face is present (face detection problem), you can use CNN for that.

Also, CNN would work for non-2D problem. If you see the implementation of every major deep learning library, you would see that they include “Convolution-1D” layer along with “Convolution-2D” and “Convolution-3D”. An example would be where instead of the data being images (which are 2D signals), they are 1D signals like sine function, you can use CNN for that.