diffusion_models.models.nn.update_ema

diffusion_models.models.nn.update_ema(target_params, source_params, rate=0.99)[source]

Update target parameters to be closer to those of source parameters using an exponential moving average.

Parameters:
  • target_params – the target parameter sequence.

  • source_params – the source parameter sequence.

  • rate – the EMA rate (closer to 1 means slower).