class_docstr: Mixed precision training using Pytorch's Automatic Mixed Precision (AMP)
class_docstr_tok: ["Mixed","precision","training","using","Pytorch","'s","Automatic","Mixed","Precision","(","AMP",")"]
code: def __init__(
      self,
      amp_mode: str
      | AMPMode = AMPMode.FP16,  # Mixed Precision training mode. Supports fp16 and bf16.
      **kwargs,
  ):
      amp_mode = AMPMode(amp_mode)
      store_attr(names="amp_mode")
      self.kwargs = kwargs
  
imports: from __future__ import annotations
  from ..basics import *
  from .progress import *
  from torch.cuda.amp import GradScaler, autocast
  from torch.cuda.amp.grad_scaler import OptState
  from ..fp16_utils import convert_network, model_grads_to_master_grads, master_params_to_model_params
  from torch.nn.utils import parameters_to_vector
label_desc: Use image node_id 1 to create a new MixedPrecision object from inherited base classes: Callback with example: obj = MixedPrecision(amp_mode)