docstr: Load weight to model.
  
  Parameters
  ----------
  weight_path : str
      Path to trained weight.
  
  Raises
  ------
  RuntimeError
      Raised when the model has not yet been contructed.
  
  Returns
  -------
  None.
docstr_tok: ["Load","weight","to","model",".","Parameters","--","--","--","--","--","weight_path",":","str","Path","to","trained","weight",".","Raises","--","--","--","RuntimeError","Raised","when","the","model","has","not","yet","been","contructed",".","Returns","--","--","--","-","None","."]
code: def load_weight(self, weight_path):
      """
      Load weight to model.
  
      Parameters
      ----------
      weight_path : str
          Path to trained weight.
  
      Raises
      ------
      RuntimeError
          Raised when the model has not yet been contructed.
  
      Returns
      -------
      None.
      """
      if self.model is None:
          raise RuntimeError("model has not yet been constructed.")
      self.model.load_state_dict(
          torch.load(weight_path, map_location=self.device),
          strict=False,
      )
      self.model.eval()
  
imports: import os
  import math
  import yaml
  from shapely.geometry import Polygon
  import PIL.Image
  import numpy
  import cv2
  import pyclipper
  import torch
  from .model.constructor import Configurable
label_desc: Use image node_id 3 for calling the DBNet obj's underlying member method code with example usage: obj.load_weight(weight_path) without return types