class_docstr: Performs backpropagation for mixed precision training.
code: def on_backward(
      self,
      trainer: "GradientDescentTrainer",
      batch_outputs: Dict[str, torch.Tensor],
      backward_called: bool,
      **kwargs,
  ) -> bool:
      if backward_called:
          raise OnBackwardException()
      trainer._scaler.scale(batch_outputs["loss"]).backward()  # type: ignore
      return True
  
file_path: allennlp/allennlp/training/callbacks/backward.py
imports: from typing import Dict, TYPE_CHECKING
  import torch
  from allennlp.training.callbacks.callback import TrainerCallback
label_desc: Use image node_id 1 for calling the MixedPrecisionBackwardCallback obj's underlying member method code with example usage: obj.on_backward(trainer, batch_outputs, backward_called) and returns: True