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 __call__(self, input):
      assert isinstance(input, Variable)
      assert not (
          set(self.feature_maps) - set([2, 3, 4, 5])
      ), "feature maps {} not in [2, 3, 4, 5]".format(self.feature_maps)
  
      res_endpoints = []
  
      res = input
      feature_maps = self.feature_maps
      severed_head = getattr(self, "severed_head", False)
      if not severed_head:
          res = self.c1_stage(res)
          feature_maps = range(2, max(self.feature_maps) + 1)
  
      for i in feature_maps:
          res = self.layer_warp(res, i)
          if i in self.feature_maps:
              res_endpoints.append(res)
          if self.freeze_at >= i:
              res.stop_gradient = True
      if self.get_prediction:
          pool = fluid.layers.pool2d(
              input=res, pool_type="avg", global_pooling=True
          )
          stdv = 1.0 / math.sqrt(pool.shape[1] * 1.0)
  
          out = fluid.layers.fc(
              input=pool,
              size=self.class_dim,
              param_attr=fluid.param_attr.ParamAttr(
                  initializer=fluid.initializer.Uniform(-stdv, stdv)
              ),
          )
          out = fluid.layers.softmax(out)
          return out
      return OrderedDict(
          [
              ("res{}_sum".format(self.feature_maps[idx]), feat)
              for idx, feat in enumerate(res_endpoints)
          ]
      )
  
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 9 for calling the ResNet obj's underlying member method code with example usage: obj.__call__(input) and returns: OrderedDict, out