code: def _load(path, model, inplace=False, input_sample=None):
      status = PytorchIPEXJITBF16Model._load_status(path)
      if isinstance(path, dict):
          checkpoint_path = path[status["checkpoint"]]
      else:
          checkpoint_path = path / status["checkpoint"]
      if status["use_jit"]:
          if status["compression"] == "bf16":
              invalidInputError(
                  model is not None,
                  "You must pass model when loading this model "
                  "which was saved with compression precision.",
              )
              invalidInputError(
                  input_sample is not None,
                  "You must pass input_sample when loading this model "
                  "which was saved with compression precision.",
              )
              state_dict = torch.load(
                  checkpoint_path, map_location="cpu"
              )
              if status["compression"] == "bf16":
                  state_dict = transform_state_dict_to_dtype(
                      state_dict, dtype="fp32"
                  )
              model = copy.deepcopy(model)
              model.load_state_dict(state_dict)
              from_load = False
          else:
              if status["use_ipex"]:
                  import intel_extension_for_pytorch as ipex
              model = torch.jit.load(checkpoint_path)
              model.eval()
              if status["use_ipex"]:
                  model = torch.jit.freeze(model)
              from_load = True
      else:
          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)
          from_load = False
      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 PytorchIPEXJITBF16Model(
          model,
          input_sample=input_sample,
          use_ipex=status["use_ipex"],
          use_jit=status["use_jit"],
          channels_last=status["channels_last"],
          channels_last_available=status["channels_last_available"],
          from_load=from_load,
          thread_num=thread_num,
          inplace=inplace,
          jit_strict=status.get("jit_strict", True),
          jit_method=status.get("jit_method", None),
          weights_prepack=status.get("weights_prepack", None),
          enable_onednn=status.get("enable_onednn", True),
          compression=status.get("compression", "fp32"),
      )
  
file_path: BigDL/python/nano/src/bigdl/nano/deps/ipex/ipex_inference_bf16_model.py
imports: from .ipex_inference_model import PytorchIPEXJITModel
  from bigdl.nano.pytorch.context_manager import generate_context_manager
  from bigdl.nano.utils.common import _avx512_checker
  from bigdl.nano.utils.common import invalidInputError
  from bigdl.nano.utils.pytorch import transform_state_dict_to_dtype
  import torch
  import copy
label_desc: Use image node_id 4 for calling the PytorchIPEXJITBF16Model obj's underlying member method code with example usage: obj._load(path, model, inplace, input_sample) and returns: PytorchIPEXJITBF16Model