Cookie Consent
Hi, this website uses essential cookies to ensure its proper operation and tracking cookies to understand how you interact with it. The latter will be set only after consent.
Read our Privacy Policy

CNN (Convolutional Neural Networks)

A Convolutional Neural Network (CNN) is a type of artificial neural network specifically designed to process pixel data and used in image classification and processing tasks. CNNs can take in an input image, assign importance (learnable weights and biases) to various aspects/objects in the image and be able to differentiate one from the other.

How CNN work

The pre-processing required in a CNN is much lower as compared to other classification algorithms. While in primitive methods filters are hand-engineered, with enough training, Convolutional Neural Networks have the ability to learn these filters/characteristics.

A CNN has layers that neurons are connected to, including convolutional layers, pooling layers, and fully-connected layers. Each layer transforms the input data to bring out high-level features. The process starts with the convolutional layers applying a number of filters to the input. The result of this convolution is passed to the next layer, often a pooling layer. This layer reduces the spatial size (width and height) of the input from the previous layer, helping to decrease computation and also control overfitting.

Further convolutional and pooling layers may follow this, depending on the complexity of the task and the depth of the network. At the end of these, the data is flattened into a vector and passed to one or more fully-connected layers, which perform the classification based on the features extracted by previous layers.

The entire network is trained by optimizing the weights in the convolutional layer filters and the neurons in the fully connected layers, using a labelled dataset and a variant of gradient descent, to minimize the error in the network's predictions.

CNNs are typically used in computer vision tasks such as object detection, face recognition, and image classification. They can also be used in natural language processing and other data science tasks, typically with 1D rather than 2D convolutions.

Lakera LLM Security Playbook
Learn how to protect against the most common LLM vulnerabilities

Download this guide to delve into the most common LLM security risks and ways to mitigate them.

Related terms
untouchable mode.
Get started for free.

Lakera Guard protects your LLM applications from cybersecurity risks with a single line of code. Get started in minutes. Become stronger every day.

Join our Slack Community.

Several people are typing about AI/ML security. 
Come join us and 1000+ others in a chat that’s thoroughly SFW.