code: def net(self, input, class_dim=1000):
      layers = self.layers
      vgg_spec = {
          11: ([1, 1, 2, 2, 2]),
          13: ([2, 2, 2, 2, 2]),
          16: ([2, 2, 3, 3, 3]),
          19: ([2, 2, 4, 4, 4]),
      }
      assert layers in list(
          vgg_spec.keys()
      ), "supported layers are {} but input layer is {}".format(
          list(vgg_spec.keys()), layers
      )
  
      nums = vgg_spec[layers]
      conv1 = self.conv_block(input, 64, nums[0])
      conv2 = self.conv_block(conv1, 128, nums[1])
      conv3 = self.conv_block(conv2, 256, nums[2])
      conv4 = self.conv_block(conv3, 512, nums[3])
      conv5 = self.conv_block(conv4, 512, nums[4])
  
      fc_dim = 4096
      fc1 = fluid.layers.fc(
          input=conv5,
          size=fc_dim,
          act="relu",
          param_attr=fluid.param_attr.ParamAttr(
              initializer=fluid.initializer.Normal(scale=0.005)
          ),
          bias_attr=fluid.param_attr.ParamAttr(
              initializer=fluid.initializer.Constant(value=0.1)
          ),
      )
      fc1 = fluid.layers.dropout(x=fc1, dropout_prob=0.5)
      fc2 = fluid.layers.fc(
          input=fc1,
          size=fc_dim,
          act="relu",
          param_attr=fluid.param_attr.ParamAttr(
              initializer=fluid.initializer.Normal(scale=0.005)
          ),
          bias_attr=fluid.param_attr.ParamAttr(
              initializer=fluid.initializer.Constant(value=0.1)
          ),
      )
      fc2 = fluid.layers.dropout(x=fc2, dropout_prob=0.5)
      out = fluid.layers.fc(
          input=fc2,
          size=class_dim,
          act="softmax",
          param_attr=fluid.param_attr.ParamAttr(
              initializer=fluid.initializer.Normal(scale=0.005)
          ),
          bias_attr=fluid.param_attr.ParamAttr(
              initializer=fluid.initializer.Constant(value=0.1)
          ),
      )
  
      return out
  
file_path: AdvBox/tutorials/image_classification/vgg.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from builtins import range
  from builtins import object
  import paddle
  import paddle.fluid
label_desc: Use image node_id 2 for calling the VGGNet obj's underlying member method code with example usage: obj.net(input, class_dim) and returns: out