class_docstr: Initialize module by loading a pretrained model.
  
  Args:
      checkpoint (str): the checkpoint file of the pretrained model should
          be load.
      prefix (str, optional): the prefix of a sub-module in the pretrained
          model. it is for loading a part of the pretrained model to
          initialize. For example, if we would like to only load the
          backbone of a detector model, we can set ``prefix='backbone.'``.
          Defaults to None.
      map_location (str): map tensors into proper locations.
class_docstr_tok: ["Initialize","module","by","loading","a","pretrained","model",".","Args",":","checkpoint","(","str",")",":","the","checkpoint","file","of","the","pretrained","model","should","be","load",".","prefix","(","str",",","optional",")",":","the","prefix","of","a","sub-module","in","the","pretrained","model",".","it","is","for","loading","a","part","of","the","pretrained","model","to","initialize",".","For","example",",","if","we","would","like","to","only","load","the","backbone","of","a","detector","model",",","we","can","set","``","prefix='backbone.","'","``",".","Defaults","to","None",".","map_location","(","str",")",":","map","tensors","into","proper","locations","."]
code: def __init__(self, checkpoint, prefix=None, map_location=None):
      self.checkpoint = checkpoint
      self.prefix = prefix
      self.map_location = map_location
  
imports: import copy
  import math
  import warnings
  import numpy
  import torch
  import torch.nn
  from torch import Tensor
  from annotator.uniformer.mmcv.utils import Registry, build_from_cfg, get_logger, print_log
label_desc: Use image node_id 1 to create a new PretrainedInit object from inherited base classes: object with example: obj = PretrainedInit(checkpoint, prefix, map_location)