0Pricing
Deep Learning Academy · Lesson

Sigmoid & Tanh: Squashing to a Range

Bounded outputs and the vanishing-gradient trap.

Squashing Activations

Some activations squeeze any input into a fixed range. The two classics are sigmoid and tanh, and both bend big numbers gently inward. 🤏

Sigmoid's Range

Sigmoid maps every value into the open interval from 0 to 1. That makes its output read naturally as a probability.

import torch
y = torch.sigmoid(x)   # outputs between 0 and 1

All lessons in this course

  1. Why Nonlinearity Unlocks Real Power
  2. ReLU and Its Leaky & GELU Cousins
  3. Sigmoid & Tanh: Squashing to a Range
  4. Softmax for Probabilities
← Back to Deep Learning Academy