liveBook · Manning

Swish

Swish, also called SiLU, is a smooth neural-network activation function defined as x multiplied by the sigmoid of βx.

How 2 Manning books explain it

Grokking AI Algorithms, Second Edition

SiLU is a smooth neural-network activation function defined by multiplying an input by its sigmoid.

How it is used
Uses SiLU inside generative image models, including convolutional layers and feed-forward networks for text embeddings.
How deep it goes
Defines the formula, compares behavior with ReLU, and demonstrates a Python implementation without developing activation-function theory.
Examples
Demonstrates SiLU in an eight-channel U-Net tensor and in a two-layer text-embedding projection.
What you can do after
Apply it via Python by computing sigmoid(x) and multiplying the result by x.

Read how Grokking AI Algorithms, Second Edition explains Swish →

Deep Learning with JAX

A smooth activation function discovered by automatic search and used here as the example nonlinearity in the network.

How it is used
Uses Swish as the hidden-layer nonlinearity in a JAX neural-network forward pass.
How deep it goes
Explains why nonlinearities matter and demonstrates the JAX call, but does not derive Swish mathematically.
Examples
Demonstrates Swish inside a multilayer prediction function applied to a flattened 28×28×1 image.
What you can do after
Apply it via JAX's jax.nn.swish function in hidden layers of a parameterized neural network.

Read how Deep Learning with JAX explains Swish →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.