code: def conv_net(self, input, class_dim=1000):
      layers = self.layers
      self.cur_layers = 0
      supported_layers = [50, 101, 152]
      assert (
          layers in supported_layers
      ), "supported layers are {} but input layer is {}".format(
          supported_layers, layers
      )
  
      if layers == 50:
          depth = [3, 4, 6, 3]
      elif layers == 101:
          depth = [3, 4, 23, 3]
      elif layers == 152:
          depth = [3, 8, 36, 3]
      num_filters = [64, 128, 256, 512]
  
      conv = self.conv_bn_layer(
          input=input,
          num_filters=64,
          filter_size=7,
          stride=2,
          act="relu",
      )
  
      conv = fluid.layers.pool2d(
          input=conv,
          pool_size=3,
          pool_stride=2,
          pool_padding=1,
          pool_type="max",
      )
  
      for block in range(len(depth)):
          for i in range(depth[block]):
              conv = self.bottleneck_block(
                  input=conv,
                  num_filters=num_filters[block],
                  stride=2 if i == 0 and block != 0 else 1,
              )
  
      pool = fluid.layers.pool2d(
          input=conv, pool_size=7, pool_type="avg", global_pooling=True
      )
      stdv = 1.0 / math.sqrt(pool.shape[1] * 1.0)
      convfc = fluid.layers.fc(
          input=pool,
          size=class_dim,
          act=None,
          param_attr=fluid.param_attr.ParamAttr(
              name="fc" + "_0.w_0",
              initializer=fluid.initializer.Uniform(-stdv, stdv),
          ),
          bias_attr=fluid.ParamAttr(name="fc" + "_0.b_0"),
      )
  
      return convfc
  
imports: from __future__ import division
  from builtins import str
  from builtins import range
  from builtins import object
  from past.utils import old_div
  import paddle
  import paddle.fluid
  import math
  from paddle.fluid.layer_helper import LayerHelper
  from paddle.fluid.param_attr import ParamAttr
  from paddle.fluid.initializer import Constant
label_desc: Use image node_id 2 for calling the ResNet obj's underlying member method code with example usage: obj.conv_net(input, class_dim) and returns: convfc