liveBook · Manning

Activation function

As explained in Optimization Algorithms: AI techniques for design, planning, and control problems

An activation function is a function applied to a neural-network unit’s pre-activation value to produce its output and introduce nonlinear behavior.

An activation function transforms a neuron's weighted input, bias, and threshold into its output, allowing neural-network units to fire nonlinearly. section 9.7

Common activation-function choices include:

  • Sign, step, tanh, arctan, logistic sigmoid, softmax, radial basis function, and ReLU. section 9.7
  • The chosen function operates within a forward pass whose parameters are optimized against a loss or cost function. section 9.7

Tanh in a neural-network forward pass

A NumPy implementation computes the hidden pre-activation as z1 = X.dot(W1) + b1, then applies a1 = np.tanh(z1) before producing output logits.

How Optimization Algorithms: AI techniques for design, planning, and control problems covers it

How deep it goes
Defines the role, lists major forms, and demonstrates tanh in code without deriving activation-function formulas.
Examples
Demonstrates tanh applied to hidden-layer values in a penguin-classification neural network.
What you can do after
Apply it via NumPy by inserting an activation into a neural-network forward pass.
How it connects
Connects activation functions to neurons, weights, bias, thresholds, logits, loss functions, and particle swarm optimization.

Also explained in

Compare how 14 books explain activation function →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Optimization Algorithms: AI techniques for design, planning, and control problems. The section links point to the parts of the book it draws on.