code: def resnet_backbone(image, num_blocks, group_func, block_func):
      with argscope(
          Conv2D,
          use_bias=False,
          kernel_initializer=tfv1.variance_scaling_initializer(
              scale=2.0, mode="fan_out"
          ),
      ):
          # Note that TF pads the image by [2, 3] instead of [3, 2].
          # Similar things happen in later stride=2 layers as well.
          l = Conv2D(
              "conv0", image, 64, 7, strides=2, activation=BNReLU
          )
          l = MaxPooling(
              "pool0", l, pool_size=3, strides=2, padding="SAME"
          )
          l = group_func("group0", l, block_func, 64, num_blocks[0], 1)
          l = group_func("group1", l, block_func, 128, num_blocks[1], 2)
          l = group_func("group2", l, block_func, 256, num_blocks[2], 2)
          l = group_func("group3", l, block_func, 512, num_blocks[3], 2)
          l = GlobalAvgPooling("gap", l)
          logits = FullyConnected(
              "linear",
              l,
              1000,
              kernel_initializer=tf.random_normal_initializer(
                  stddev=0.01
              ),
          )
      return logits
  
file_path: tensorpack/examples/Saliency/resnet_model.py
imports: import tensorflow
  from tensorpack import tfv1
  from tensorpack.models import BatchNorm, BNReLU, Conv2D, FullyConnected, GlobalAvgPooling, MaxPooling
  from tensorpack.tfutils.argscope import argscope, get_arg_scope
label_desc: Use image node_id 12 for calling a global function with example usage: resnet_backbone(image, num_blocks, group_func, block_func) and returns: logits