A perceptron is a single layer neural network and a multi-layer perceptron is called Neural Networks. Think of a perceptron as a brick and a wall (collection of bricks) is a neural network.
The perceptron is a very simple component - if you understand how a perceptron works, the you should be able to master how a neural network works! Built on the same concept.
Single Perceptron
Connect More Perceptrons (Layers)
As you connect more and more perceptrons together in layers this is where the magic starts to happen. A single perceptron is limited in what it's able to accomplish (simple binary classification). Lots of perceptrons (neural network) is akin to a brain - and is able to simulate complex models.
Before jumping into neural networks (and deep neural networks - networks with lots and lots of layers) - let's look at a perceptron in detail.
Neural Networks and perceptrons are built on the same principles (work the same way). So, if you want to know how neural network works, learn how perceptron works.
A perceptron consists of 4 parts:
1. Input values
2. Weights and Bias
3. Net sum
4. Activation Function
The equation for the perceptron is given by:
\[ y = \phi(\mathbf{w} \cdot \mathbf{x} + b) \]
where:
- \(\mathbf{w} = [w_1, w_2, \ldots, w_n]\) is the weight vector.
- \(\mathbf{x} = [x_1, x_2, \ldots, x_n]\) is the input vector.
- \(b\) is the bias term.
- \(\cdot\) represents the dot product.
- \(\phi\) is the activation function (this depends on the type of logic you're aiming to )
The perceptron outputs a decision based on the weighted sum of its inputs plus the bias which is passed through an activation function.
The activation function is a simple mathematical function that determines the output of a neuron given its inputs and weights.
It is crucial for introducing non-linearity into the model, enabling the network to learn complex patterns and decision boundaries.
Without the activation function, the neuron is simply a 'linear equation' - sums up the inputs which are multiplied by a scale. Which is fine, but is very limited.
An activation function can be something as simple as a threshold step (if the value is greater than some value it's 1 otherwise it's 0).
There are a variety of activation functions, such as the sigmoid function, hyperbolic tangent (tanh), and rectified linear unit (ReLU).
Each type of activation function has unique properties that make it suitable for different tasks: sigmoid and tanh functions are smooth and have outputs ranging between specific bounds, making them useful for probabilistic interpretations, while ReLU introduces sparsity and efficient gradient propagation, making it popular for deep learning.
As you'll learn, which activation function you choose can significantly impacts the learning capabilities and performance of your neural network.
Activation Functions
At this point it's worth providing a table so you can see the equations for the most popular activiation functions.
Visitor:
Copyright (c) 2002-2025 xbdev.net - All rights reserved.
Designated articles, tutorials and software are the property of their respective owners.