class_docstr: Exponential Moving Average of Fairseq Models
class_docstr_tok: ["Exponential","Moving","Average","of","Fairseq","Models"]
code: def set_decay(self, decay, weight_decay=None):
      self.decay = decay
      if weight_decay is not None:
          self.weight_decay = weight_decay
  
file_path: fairseq/fairseq/modules/ema_module.py
imports: import copy
  from dataclasses import dataclass, field
  import logging
  import torch
  from omegaconf import II
  from fairseq.dataclass import FairseqDataclass
label_desc: Use image node_id 4 for calling the EMAModule obj's underlying member method code with example usage: obj.set_decay(decay, weight_decay) without return types