Perceptrons
A Perceptron is the simplest form of a neural network. It consists of a single neuron that takes inputs, weights them, adds a bias, and passes the result through an activation function.
The Math
Output = Activation( (Input1 * Weight1) + (Input2 * Weight2) + ... + Bias )
Implementing a Perceptron
Let's build a simple perceptron that acts as an "AND" gate. It should only output 1 if both inputs are 1.
python
Output:
Click "Run Code" to see output