docstr: load pretrained weights from another model
docstr_tok: ["load","pretrained","weights","from","another","model"]
code: def load_pretrained_weights(self):
      """
      load pretrained weights from another model
      """
      # if hasattr(self.opt, 'resume'):
      #     assert self.opt.resume is False
      assert os.path.isfile(
          self.opt.load_weights_path
      ), self.opt.load_weights_path
      content_list = []
      saved = torch.load(self.opt.load_weights_path, map_location="cpu")
      utils.safe_load_weights(
          self.net, saved["hybrid_model_state_dict"]
      )
      content_list += [
          f"Loaded pretrained weights from {self.opt.load_weights_path}"
      ]
      utils.print_notification(content_list)
  
imports: import os
  import math
  import time
  import random
  import tqdm
  import torch
  import torch.nn.functional
  import numpy
  import torchvision.utils
  import igl
  import lpips
  from utils import utils, render_utils, ray_utils
  from trainers import tensorboard_helper
  from options import options
  from cameras.captures import ResizedPinholeCapture
  from cameras.pinhole_camera import PinholeCamera
  from models.vanilla import weight_reset
  from utils.constant import HARD_SURFACE_OFFSET, PATCH_SIZE, PATCH_SIZE_SQUARED, CANONICAL_ZOOM_FACTOR, CANONICAL_CAMERA_DIST
label_desc: Use image node_id 19 for calling the HumanNeRFTrainer obj's underlying member method code with example usage: obj.load_pretrained_weights() without return types