class_docstr: Simplest base roi head including one bbox head and one mask head.
class_docstr_tok: ["Simplest","base","roi","head","including","one","bbox","head","and","one","mask","head","."]
docstr: Initialize the weights in head.
  
  Args:
      pretrained (str, optional): Path to pre-trained weights.
          Defaults to None.
docstr_tok: ["Initialize","the","weights","in","head",".","Args",":","pretrained","(","str",",","optional",")",":","Path","to","pre-trained","weights",".","Defaults","to","None","."]
code: def init_weights(self, pretrained):
      """Initialize the weights in head.
  
      Args:
          pretrained (str, optional): Path to pre-trained weights.
              Defaults to None.
      """
      if self.with_shared_head:
          self.shared_head.init_weights(pretrained=pretrained)
      if self.with_bbox:
          self.bbox_roi_extractor.init_weights()
          self.bbox_head.init_weights()
      if self.with_mask:
          self.mask_head.init_weights()
          if not self.share_roi_extractor:
              self.mask_roi_extractor.init_weights()
  
imports: import torch
  from mmdet.core import bbox2result, bbox2roi, build_assigner, build_sampler
  from ..builder import HEADS, build_head, build_roi_extractor
  from .base_roi_head import BaseRoIHead
  from .test_mixins import BBoxTestMixin, MaskTestMixin
label_desc: Use image node_id 4 for calling the StandardRoIHead obj's underlying member method code with example usage: obj.init_weights(pretrained) without return types