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: Build one branch.
docstr_tok: ["Build","one","branch","."]
code: def _make_one_branch(
      self, branch_index, block, num_blocks, num_channels, stride=1
  ):
      """Build one branch."""
      downsample = None
      if (
          stride != 1
          or self.in_channels[branch_index]
          != num_channels[branch_index] * block.expansion
      ):
          downsample = nn.Sequential(
              build_conv_layer(
                  self.conv_cfg,
                  self.in_channels[branch_index],
                  num_channels[branch_index] * block.expansion,
                  kernel_size=1,
                  stride=stride,
                  bias=False,
              ),
              build_norm_layer(
                  self.norm_cfg,
                  num_channels[branch_index] * block.expansion,
              )[1],
          )
  
      layers = []
      layers.append(
          block(
              self.in_channels[branch_index],
              num_channels[branch_index],
              stride,
              downsample=downsample,
              with_cp=self.with_cp,
              norm_cfg=self.norm_cfg,
              conv_cfg=self.conv_cfg,
          )
      )
      self.in_channels[branch_index] = (
          num_channels[branch_index] * block.expansion
      )
      for i in range(1, num_blocks[branch_index]):
          layers.append(
              block(
                  self.in_channels[branch_index],
                  num_channels[branch_index],
                  with_cp=self.with_cp,
                  norm_cfg=self.norm_cfg,
                  conv_cfg=self.conv_cfg,
              )
          )
  
      return nn.Sequential(*layers)
  
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 3 for calling the HRModule obj's underlying member method code with example usage: obj._make_one_branch(branch_index, block, num_blocks, num_channels, stride) and returns: nn