text: import torch
  from torch import nn
  
  
  class VGG16(nn.Module):
      def __init__(self, num_class=1000):
          super(VGG16, self).__init__()
          self.convolution = nn.Sequential(
              nn.Conv2d(3, 64, 3, padding=1),
              nn.ReLU(inplace=True),
              nn.Conv2d(64, 64, 3, padding=1),
              nn.ReLU(inplace=True),
              nn.MaxPool2d(2, 2),
  
              nn.Conv2d(64, 128, 3, padding=1),
              nn.ReLU(inplace=True),
              nn.Conv2d(128, 128, 3, padding=1),
              nn.ReLU(inplace=True),
              nn.MaxPool2d(2, 2),
  
              nn.Conv2d(128, 256, 3, padding=1),
              nn.ReLU(inplace=True),
              nn.Conv2d(256, 256, 3, padding=1),
              nn.ReLU(inplace=True),
              nn.Conv2d(256, 256, 1, padding=1),
              nn.ReLU(inplace=True),
              nn.MaxPool2d(2, 2),
  
              nn.Conv2d(256, 512, 3, padding=1),
              nn.ReLU(inplace=True),
              nn.Conv2d(512, 512, 3, padding=1),
              nn.ReLU(inplace=True),
              nn.Conv2d(512, 512, 1, padding=1),
              nn.ReLU(inplace=True),
              nn.MaxPool2d(2, 2),
  
              nn.Conv2d(512, 512, 3, padding=1),
              nn.ReLU(inplace=True),
              nn.Conv2d(512, 512, 3, padding=1),
              nn.ReLU(inplace=True),
              nn.Conv2d(512, 512, 1, padding=1),
              nn.ReLU(inplace=True),
              nn.MaxPool2d(2, 2)
          )
          self.classifier = nn.Sequential(
              nn.Linear(512*7*7, 4096),
              nn.ReLU(inplace=True),
              nn.Linear(4096, 4096),
              nn.ReLU(inplace=True),
              nn.Linear(4096, num_class)
          )
  
      def forward(self, x):
          x = self.convolution(x)
          x = x.view(x.shape[0], -1)
          x = self.classifier(x)
          return x
  
  
  vgg = VGG16()
  print(vgg)
  