An artificial neuron is a computational unit that receives input features, combines them with learnable weights and a bias, and applies an activation function to produce an output. A logistic-regression model is a single neuron using the sigmoid activation. section 8.2.1
A neuron can be understood as a short computational graph:
- Compute a weighted sum of the inputs and add the bias. section 8.2.1
- Pass the resulting score through an activation function such as sigmoid, a linear function, or a step function. section 8.2.1
- Chain neurons so one output becomes another neuron’s input; hidden layers provide nonlinear transformations that a single neuron cannot provide. section 8.2.1 section 8.3
- Train the weights and bias by comparing the output with a target, then propagating gradients backward through the graph. section 8.2.1
A neuron in PyTorch
For x = [1, 2, 3], weights w = [0.1, 0.2, 0.3], and bias b = 0.1, compute z = sum(x · w) + b, obtain y = sigmoid(z), compare y with a target using binary cross-entropy, and call loss.backward() to calculate gradients for w and b. section 8.2.1
Figure 8.6 Example of a computational graph at a high level of abstraction.

Use the computational-graph figure to trace data from inputs through weighted operations and activation to the neuron output. section 8.2.1









