Mean absolute error (MAE), also called L1 loss, measures the average absolute difference between predicted numerical values and their targets. In diffusion training, it measures the difference between noise predicted by a denoising U-Net and the noise actually injected into images. section 5.3.1 section 5.4.3
A training step uses MAE in this sequence:
- Add randomly selected amounts of noise to clean images. section 5.3.1
- Pass the noisy images and their time steps to the denoising U-Net. section 5.3.1
- Compare predicted noise with ground-truth noise using PyTorch's l1_loss. section 5.4.3 section 7.3.2
- Backpropagate the loss and update model parameters to minimize it. section 5.4.3
Diffusion-model training
For each noisy clothing or flower image, the model predicts the injected noise. MAE supplies the scalar training signal used to improve those predictions across batches and epochs. section 5.3.1 section 7.3.2
Figure 5.8 Steps to train a denoising U-Net model to remove noise from images
Trace the six-stage loop from clean images and noise injection through prediction, MAE calculation, and parameter updates. section 5.3.1









