docstr: Computes the sum of gradients of the given tensor w.r.t. graph leaves.
  
  Compared to :func:`fairseq.optim.FairseqOptimizer.backward`, this
  function additionally dynamically scales the loss to avoid gradient
  underflow.
docstr_tok: ["Computes","the","sum","of","gradients","of","the","given","tensor","w.r.t",".","graph","leaves",".","Compared","to",":","func",":","`","fairseq.optim.FairseqOptimizer.backward","`",",","this","function","additionally","dynamically","scales","the","loss","to","avoid","gradient","underflow","."]
code: def backward(self, loss):
      """Computes the sum of gradients of the given tensor w.r.t. graph leaves.
  
      Compared to :func:`fairseq.optim.FairseqOptimizer.backward`, this
      function additionally dynamically scales the loss to avoid gradient
      underflow.
      """
      if self.scaler is not None:
          loss = self.scaler.scale(loss)
      loss.backward()
  
imports: from collections import defaultdict
  from itertools import chain
  import torch
  from omegaconf import DictConfig
  from fairseq import optim
  from .dynamic_loss_scaler import DynamicLossScaler
label_desc: Use image node_id 5 for calling the _MemoryEfficientFP16OptimizerMixin obj's underlying member method code with example usage: obj.backward(loss) without return types