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 assigner and sampler.
docstr_tok: ["Initialize","assigner","and","sampler","."]
code: def init_assigner_sampler(self):
      """Initialize assigner and sampler."""
      self.bbox_assigner = None
      self.bbox_sampler = None
      if self.train_cfg:
          self.bbox_assigner = build_assigner(self.train_cfg.assigner)
          self.bbox_sampler = build_sampler(
              self.train_cfg.sampler, context=self
          )
  
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 1 for calling the StandardRoIHead obj's underlying member method code with example usage: obj.init_assigner_sampler() without return types