class_docstr: Model of BFloat16 with auto mixed precision.
class_docstr_tok: ["Model","of","BFloat16","with","auto","mixed","precision","."]
code: def _load(path, model):
      status = BF16Model._load_status(path)
      checkpoint_path = path / status["checkpoint"]
      state_dict = torch.load(checkpoint_path)
      model.eval()
      if status["compression"] == "bf16":
          state_dict = transform_state_dict_to_dtype(
              state_dict, dtype="fp32"
          )
      model.load_state_dict(state_dict)
      thread_num = status.get("thread_num", None)
      if thread_num == {}:
          thread_num = None
      if thread_num is not None:
          thread_num = int(status["thread_num"])
      return BF16Model(
          model,
          channels_last=status["channels_last"],
          channels_last_available=status["channels_last_available"],
          thread_num=thread_num,
          compression=status["compression"],
      )
  
imports: from logging import warning
  import torch
  import os
  from contextlib import redirect_stdout
  from bigdl.nano.utils.pytorch import generate_channels_last_available, apply_proper_channels_last
  from bigdl.nano.pytorch.model import AcceleratedLightningModule
  from bigdl.nano.utils.common import invalidInputError
  from bigdl.nano.utils.pytorch import TORCH_VERSION_LESS_1_10, TORCH_VERSION_LESS_1_12, transform_state_dict_to_dtype
  from bigdl.nano.utils.common import _bf16_checker
  from bigdl.nano.pytorch.context_manager import generate_context_manager
label_desc: Use image node_id 11 for calling the BF16Model obj's underlying member method code with example usage: obj._load(path, model) and returns: BF16Model