liveBook · Manning

Parameter

As explained in Build a Text-to-Image Generator (from Scratch)

A model parameter is a numerical value used by a model that is typically learned or adjusted during training.

A parameter is a numerical value used by a model and typically learned or adjusted during training. Model parameters, also called model weights, determine how the model transforms inputs into predictions. section 5.3.1 section 6.3.3

Training changes parameters to reduce a loss. A denoising diffusion model adds noise to clean images, gives the noisy images and time steps to a U-Net, compares predicted noise with actual noise, and adjusts the parameters to minimize the error. section 5.3.1 section 6.3.3

Parameters appear in several practical roles:

  • Count them to estimate model scale: one U-Net configuration contains more than 133 million parameters. section 7.3.1
  • Save them after training as a model state dictionary so the trained model can be reused. section 6.3.3
  • Learn them for different objectives: diffusion models minimize noise-prediction error, while VAEs balance reconstruction loss with latent-distribution alignment. section 6.3.3 section 9.1.1

A parameter update in a denoising model

For each batch, the DDPM supplies noisy clothing-item images and labels to a denoising U-Net. The loss measures the difference between actual and predicted noise; backpropagation and the optimizer then update the U-Net's parameters. section 5.3.1

Figure 5.8 Steps to train a denoising U-Net model to remove noise from images

Follow the training pipeline from clean images and sampled time steps through noise prediction, loss calculation, and parameter adjustment. section 5.3.1

How Build a Text-to-Image Generator (from Scratch) covers it

How deep it goes
Traces parameters through loss calculation, backpropagation, optimizer updates, counting, and saving, but does not derive their numerical internals.
Examples
Uses denoising U-Nets, FashionMNIST clothing images, attention layers, and a VAE encoder's learned mean and variance.
What you can do after
Operate/configure PyTorch training code that updates, counts, and saves model parameters.
How it connects
Connects parameters to model weights, U-Net, diffusion models, loss functions, optimizers, attention mechanisms, and variational autoencoders.

Also explained in

Compare how 31 books explain parameter →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Text-to-Image Generator (from Scratch). The section links point to the parts of the book it draws on.