What is a neural network?

What’s the problem with simple NNs?

How does a CNN work?

What is convolution?

Padding and striding

  • Padding. Padding expands the input matrix by adding fake pixels to the borders of the matrix. This is done because convolution reduces the size of the matrix. For example, a 5×5 matrix turns into a 3×3 matrix when a filter goes over it.
  • Striding. It often happens that when working with a convolutional layer, you need to get an output that is smaller than the input. One way to achieve this is to use a pooling layer. Another way to achieve this is to use striding. The idea behind stride is to skip some areas when the kernel slides over: for example, skipping every 2 or 3 pixels. It reduces spatial resolution and makes the network more computationally efficient.

3 layers of CNN

  • A convolutional layer is responsible for recognizing features in pixels.
  • A pooling layer is responsible for making these features more abstract.
  • A fully-connected layer is responsible for using the acquired features for prediction.

Convolutional layer

Pooling layer

  • Maximum Pooling. It calculates the maximum value for each patch of the feature map.
  • Average pooling. It calculates the average value for each patch on the feature map.

Fully-connected layer

Advantages of convolutional neural networks

Feature learning

Computational efficiency

High accuracy

Drawbacks of ConvNet

Adversarial attacks

Data-intensive training

What are convolutional neural networks used for?

Image classification

Object detection

Audio visual matching

Object reconstruction

Speech recognition

Summing up



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Umair Akbar

Umair Akbar

Tesla Software Engineer. Autopilot.