class_docstr: Residual Network, see https://arxiv.org/abs/1512.03385
  Args:
      depth (int): ResNet depth, should be 34, 50.
      freeze_at (int): freeze the backbone at which stage
      norm_type (str): normalization type, 'bn'/'sync_bn'/'affine_channel'
      freeze_norm (bool): freeze normalization layers
      norm_decay (float): weight decay for normalization layer weights
      variant (str): ResNet variant, supports 'a', 'b', 'c', 'd' currently
      feature_maps (list): index of stages whose feature maps are returned
      dcn_v2_stages (list): index of stages who select deformable conv v2
      nonlocal_stages (list): index of stages who select nonlocal networks
class_docstr_tok: ["Residual","Network",",","see","https",":","\/\/arxiv.org\/abs\/1512.03385","Args",":","depth","(","int",")",":","ResNet","depth",",","should","be","34",",","50.","freeze_at","(","int",")",":","freeze","the","backbone","at","which","stage","norm_type","(","str",")",":","normalization","type",",","'bn'\/'sync_bn'\/'affine_channel'","freeze_norm","(","bool",")",":","freeze","normalization","layers","norm_decay","(","float",")",":","weight","decay","for","normalization","layer","weights","variant","(","str",")",":","ResNet","variant",",","supports","'","a","'",",","'","b","'",",","'","c","'",",","'d","'","currently","feature_maps","(","list",")",":","index","of","stages","whose","feature","maps","are","returned","dcn_v2_stages","(","list",")",":","index","of","stages","who","select","deformable","conv","v2","nonlocal_stages","(","list",")",":","index","of","stages","who","select","nonlocal","networks"]
code: def _shortcut(self, input, ch_out, stride, is_first, name):
      max_pooling_in_short_cut = self.variant == "d"
      ch_in = input.shape[1]
      # the naming rule is same as pretrained weight
      name = self.na.fix_shortcut_name(name)
      std_senet = getattr(self, "std_senet", False)
      if (
          ch_in != ch_out
          or stride != 1
          or (self.depth < 50 and is_first)
      ):
          if std_senet:
              if is_first:
                  return self._conv_norm(
                      input, ch_out, 1, stride, name=name
                  )
              else:
                  return self._conv_norm(
                      input, ch_out, 3, stride, name=name
                  )
          if max_pooling_in_short_cut and not is_first:
              input = fluid.layers.pool2d(
                  input=input,
                  pool_size=2,
                  pool_stride=2,
                  pool_padding=0,
                  ceil_mode=True,
                  pool_type="avg",
              )
              return self._conv_norm(input, ch_out, 1, 1, name=name)
          return self._conv_norm(input, ch_out, 1, stride, name=name)
      else:
          return input
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  from collections import OrderedDict
  from numbers import Integral
  from paddle import fluid
  from paddle.fluid.param_attr import ParamAttr
  from paddle.fluid.framework import Variable
  from paddle.fluid.regularizer import L2Decay
  from paddle.fluid.initializer import Constant
  from .nonlocal_helper import add_space_nonlocal
  from .name_adapter import NameAdapter
label_desc: Use image node_id 4 for calling the ResNet obj's underlying member method code with example usage: obj._shortcut(input, ch_out, stride, is_first, name) and returns: self, input, self, self, self