liveBook · Manning

Weight initialization

As explained in Deep Learning with JAX

The process of assigning initial values to neural-network weights before training begins.

Before training begins, a neural network needs initial values for its weights and biases. Weight initialization supplies those values, using randomness as part of the model-building process. section 9.0 section 2.4

In JAX, initialization receives a PRNGKey from outside the model. This keeps random-number generation functionally pure: keys represent generator state, while parameters remain explicit data passed to the stateless forward pass. section 9.0 section 2.4

Figure 2.4 The process of initializing and applying a neural network in JAX

Follow the initialization-to-application flow for a JAX neural network, including externally supplied randomness and explicit model parameters. section 2.4

How Deep Learning with JAX covers it

How deep it goes
Explains the role of initialization and external PRNG keys, but stops short of specifying initialization distributions or algorithms.
Examples
Uses a fully connected network with 784 inputs, 512 hidden neurons, and 10 output neurons to illustrate initialization and application.
What it assumes
Assumes familiarity with feed-forward layers, weights, biases, activations, and forward passes while contrasting JAX with PyTorch and TensorFlow.
What you can do after
Build it from scratch by initializing layer parameters with externally supplied random state and passing them into a pure forward pass.
How it connects
Connects weight initialization with PRNG keys, functional programming, model parameters, forward passes, and neural-network layers.

Also explained in

Compare how 2 books explain weight initialization →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Deep Learning with JAX. The section links point to the parts of the book it draws on.