class_docstr: Base class for encoders.
docstr: State from trainer to pass along to model at every update.
docstr_tok: ["State","from","trainer","to","pass","along","to","model","at","every","update","."]
code: def set_num_updates(self, num_updates):
      """State from trainer to pass along to model at every update."""
  
      def _apply(m):
          if hasattr(m, "set_num_updates") and m != self:
              m.set_num_updates(num_updates)
  
      self.apply(_apply)
  
file_path: fairseq/fairseq/models/fairseq_encoder.py
imports: from typing import Dict, List, NamedTuple, Optional
  import torch
  import torch.nn
  from torch import Tensor
label_desc: Use image node_id 8 for calling the FairseqEncoder obj's underlying member method code with example usage: obj.set_num_updates(num_updates) without return types