code: def resnet_imagenet(input, class_dim, depth=50):
      cfg = {
          18: ([2, 2, 2, 1], basicblock),
          34: ([3, 4, 6, 3], basicblock),
          50: ([3, 4, 6, 3], bottleneck),
          101: ([3, 4, 23, 3], bottleneck),
          152: ([3, 8, 36, 3], bottleneck),
      }
      stages, block_func = cfg[depth]
      conv1 = conv_bn_layer(
          input, ch_in=3, ch_out=64, filter_size=7, stride=2, padding=3
      )
      pool1 = paddle.layer.img_pool(input=conv1, pool_size=3, stride=2)
      res1 = layer_warp(block_func, pool1, 64, stages[0], 1)
      res2 = layer_warp(block_func, res1, 128, stages[1], 2)
      res3 = layer_warp(block_func, res2, 256, stages[2], 2)
      res4 = layer_warp(block_func, res3, 512, stages[3], 2)
      pool2 = paddle.layer.img_pool(
          input=res4,
          pool_size=7,
          stride=1,
          pool_type=paddle.pooling.Avg(),
      )
      out = paddle.layer.fc(
          input=pool2, size=class_dim, act=paddle.activation.Softmax()
      )
      return out
  
file_path: MMdnn/mmdnn/conversion/examples/paddle/models/resnet.py
imports: import paddle.v2
label_desc: Use image node_id 6 for calling a global function with example usage: resnet_imagenet(input, class_dim, depth) and returns: out