1
$\begingroup$

Is CNN only applicable to time-series data or image data?

When should we use CNN instead of MLP?

$\endgroup$
1
  • $\begingroup$ A simple answer is when you need a convolution like applying filters in image processing or auto-regression in time series. $\endgroup$
    – OmG
    Sep 17 '21 at 22:23
3
$\begingroup$

CNN applies the same filters to every "chunk" of the input data. It's applicable when you think every chunk should be processed the same way.

For example, we think a face in the top-left of the image should be recognized just as well as a face in the bottom-right. So we do expect to process each part of the image the same way, and a CNN is good for this.

If we did not use a CNN, the network would need to learn separately at each position. It would learn to recognize faces in the top-left based on training examples where faces were in the top-left, and it would learn to recognize faces in the bottom-right based on training examples where faces were in the bottom-right. Because a CNN necessarily uses the same weights on each part of the image, seeing a face anywhere helps it update the shared weights which helps it recognize faces in every part of the image. Therefore, less training data may be needed.

A CNN might not be so good at classifying MNIST digits, for example, for the same reason. A /-shaped line in the top-left probably indicates a 6, but a /-shaped line in the bottom-right is more likely to indicate a 9, so we actually don't want the same weights there. It could still learn to sort this out in its final dense layer, of course. But if you wanted to find digits in a larger image you'd use a CNN.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.