class_docstr: High-Resolution Module for HRNet.
  
  In this module, every branch has 4 BasicBlocks/Bottlenecks. Fusion/Exchange
  is in this module.
class_docstr_tok: ["High-Resolution","Module","for","HRNet",".","In","this","module",",","every","branch","has","4","BasicBlocks\/Bottlenecks",".","Fusion\/Exchange","is","in","this","module","."]
docstr: Check branches configuration.
docstr_tok: ["Check","branches","configuration","."]
code: def _check_branches(
      self, num_branches, num_blocks, in_channels, num_channels
  ):
      """Check branches configuration."""
      if num_branches != len(num_blocks):
          error_msg = (
              f"NUM_BRANCHES({num_branches}) <> NUM_BLOCKS("
              f"{len(num_blocks)})"
          )
          raise ValueError(error_msg)
  
      if num_branches != len(num_channels):
          error_msg = (
              f"NUM_BRANCHES({num_branches}) <> NUM_CHANNELS("
              f"{len(num_channels)})"
          )
          raise ValueError(error_msg)
  
      if num_branches != len(in_channels):
          error_msg = (
              f"NUM_BRANCHES({num_branches}) <> NUM_INCHANNELS("
              f"{len(in_channels)})"
          )
          raise ValueError(error_msg)
  
imports: import torch.nn
  from annotator.uniformer.mmcv.cnn import build_conv_layer, build_norm_layer, constant_init, kaiming_init
  from annotator.uniformer.mmcv.runner import load_checkpoint
  from annotator.uniformer.mmcv.utils.parrots_wrapper import _BatchNorm
  from annotator.uniformer.mmseg.ops import Upsample, resize
  from annotator.uniformer.mmseg.utils import get_root_logger
  from ..builder import BACKBONES
  from .resnet import BasicBlock, Bottleneck
label_desc: Use image node_id 2 for calling the HRModule obj's underlying member method code with example usage: obj._check_branches(num_branches, num_blocks, in_channels, num_channels) without return types