docstr: resume training:
  resume from the recorded epoch, iteration, and saved weights.
  resume from the model with the same name.
docstr_tok: ["resume","training",":","resume","from","the","recorded","epoch",",","iteration",",","and","saved","weights",".","resume","from","the","model","with","the","same","name","."]
code: def resume(self):
      """resume training:
      resume from the recorded epoch, iteration, and saved weights.
      resume from the model with the same name.
      """
      if hasattr(self.opt, "load_weights"):
          assert (
              self.opt.load_weights is None
              or self.opt.load_weights == False
          )
      # 1. load check point
      checkpoint_path = os.path.join(self.opt.out, "checkpoint.pth.tar")
      if os.path.isfile(checkpoint_path):
          checkpoint = torch.load(checkpoint_path)
      else:
          raise FileNotFoundError(
              "model check point cannnot found: {0}".format(
                  checkpoint_path
              )
          )
      # 2. load data
      self.epoch = checkpoint["epoch"]
      self.iteration = checkpoint["iteration"]
      self.load_pretrained_weights()
      self.optim.load_state_dict(checkpoint["optim_state_dict"])
  
imports: import os
  import time
  from utils.render_utils import render_vanilla
  import tqdm
  import torch
  import torch.nn.functional
  import torchvision.utils
  import numpy
  from utils import utils, render_utils, ray_utils
  from trainers import base_trainer, tensorboard_helper
  from models.vanilla import weight_reset
label_desc: Use image node_id 10 for calling the NeRFTrainer obj's underlying member method code with example usage: obj.resume() without return types