the perceptron is the simplest model of a neuron: takes a weighted sum of inputs, fires if it exceeds a threshold. foundation of everything that follows.
by “firing”, we simply mean that after all the inputs have each been multiplied by the bias term, they are all added together. This sum is then passed through an Activation Function , there are many but this often either just squishes the range of possible values to a scale between 0 and 1 (Sigmoid Function ) or sets to 0 if less than 0 ( ReLU )
z = i ∑ w i x i + b
y ^ = { 1 0 z ≥ 0 z < 0
"\\begin{document}\n\\usetikzlibrary{arrows.meta, positioning}\n\\begin{tikzpicture}[\n input/.style={circle, draw, thick, minimum size=10mm, fill=blue!8, text=black},\n sumnode/.style={circle, draw, thick, minimum size=14mm, fill=orange!12, text=black},\n actnode/.style={rectangle, draw, thick, minimum width=16mm, minimum height=10mm, rounded corners=3pt, fill=green!10, text=black},\n output/.style={circle, draw, thick, minimum size=10mm, fill=red!10, text=black},\n bias/.style={circle, draw, thick, minimum size=10mm, fill=yellow!15, text=black},\n weight/.style={font=\\small, midway, fill=white, inner sep=2pt, text=black},\n arr/.style={-{Stealth[length=2.5mm]}, thick},\n lbl/.style={font=\\small\\bfseries, text=black!40}\n]\n\n% Input nodes\n\\node[input] (x1) at (0, 2) {$x_1$};\n\\node[input] (x2) at (0, 0) {$x_2$};\n\\node at (0, -1.2) {$\\vdots$};\n\\node[input] (xn) at (0, -2.4) {$x_n$};\n\n% Summation node\n\\node[sumnode] (sum) at (4, 0) {$\\sum$};\n\n% Bias\n\\node[bias] (b) at (4, -3.2) {$b$};\n\n% Activation\n\\node[actnode] (act) at (7, 0) {$\\sigma(\\cdot)$};\n\n% Output\n\\node[output] (y) at (9.5, 0) {$\\hat{y}$};\n\n% Weighted edges\n\\draw[arr] (x1) -- node[weight, above] {$w_1$} (sum);\n\\draw[arr] (x2) -- node[weight, above] {$w_2$} (sum);\n\\draw[arr] (xn) -- node[weight, below] {$w_n$} (sum);\n\n% Bias edge\n\\draw[arr] (b) -- (sum);\n\n% Sum to activation\n\\draw[arr] (sum) -- node[weight, above] {$z$} (act);\n\n% Activation to output\n\\draw[arr] (act) -- (y);\n\n% Labels\n\\node[lbl, above=3mm of x1] {Inputs};\n\\node[lbl, above=3mm of sum] {Sum};\n\\node[lbl, above=3mm of act] {Activation};\n\\node[lbl, above=3mm of y] {Output};\n\n\\end{tikzpicture}\n\\end{document}" x 1 x 2 . . . x n P b ¾ ( ¢ ) ^ y w 1 w 2 w n z Inputs Sum Activ ation Output source code