Skip to content

semipy.methods.utils.EMA

Warning

This section is in construction.

    class semipy.methods.utils.EMA(model, decay, device='cpu')

This EMA class stores a model, EMA decay and has methods to update and transfer parameters from the training model to an EMA model.

Parameters

  • model - The training model.
  • decay (float) - EMA decay.
  • device (str) - Device to use. It should be the same as the training device. Default: 'cpu'