class_docstr: Exponential Moving Average of Fairseq Models
class_docstr_tok: ["Exponential","Moving","Average","of","Fairseq","Models"]
docstr: Load the model parameters from EMA model.
  Useful for inference or fine-tuning from the EMA model.
docstr_tok: ["Load","the","model","parameters","from","EMA","model",".","Useful","for","inference","or","fine-tuning","from","the","EMA","model","."]
code: def reverse(self, model):
      """
      Load the model parameters from EMA model.
      Useful for inference or fine-tuning from the EMA model.
      """
      d = self.model.state_dict()
      if "_ema" in d:
          del d["_ema"]
  
      model.load_state_dict(d, strict=False)
      return model
  
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 8 for calling the EMAModule obj's underlying member method code with example usage: obj.reverse(model) and returns: model