class_docstr: VGG19 implementation.
code: def build(self):
      # inputs in [0, 255]
      self.preprocess = preprocess
      self.conv1_1 = objax.nn.Conv2D(nin=3, nout=64, k=3)
      self.relu1_1 = objax.functional.relu
      self.conv1_2 = objax.nn.Conv2D(nin=64, nout=64, k=3)
      self.relu1_2 = objax.functional.relu
      self.pool1 = max_pool_2d
  
      self.conv2_1 = objax.nn.Conv2D(nin=64, nout=128, k=3)
      self.relu2_1 = objax.functional.relu
      self.conv2_2 = objax.nn.Conv2D(nin=128, nout=128, k=3)
      self.relu2_2 = objax.functional.relu
      self.pool2 = max_pool_2d
  
      self.conv3_1 = objax.nn.Conv2D(nin=128, nout=256, k=3)
      self.relu3_1 = objax.functional.relu
      self.conv3_2 = objax.nn.Conv2D(nin=256, nout=256, k=3)
      self.relu3_2 = objax.functional.relu
      self.conv3_3 = objax.nn.Conv2D(nin=256, nout=256, k=3)
      self.relu3_3 = objax.functional.relu
      self.conv3_4 = objax.nn.Conv2D(nin=256, nout=256, k=3)
      self.relu3_4 = objax.functional.relu
      self.pool3 = max_pool_2d
  
      self.conv4_1 = objax.nn.Conv2D(nin=256, nout=512, k=3)
      self.relu4_1 = objax.functional.relu
      self.conv4_2 = objax.nn.Conv2D(nin=512, nout=512, k=3)
      self.relu4_2 = objax.functional.relu
      self.conv4_3 = objax.nn.Conv2D(nin=512, nout=512, k=3)
      self.relu4_3 = objax.functional.relu
      self.conv4_4 = objax.nn.Conv2D(nin=512, nout=512, k=3)
      self.relu4_4 = objax.functional.relu
      self.pool4 = max_pool_2d
  
      self.conv5_1 = objax.nn.Conv2D(nin=512, nout=512, k=3)
      self.relu5_1 = objax.functional.relu
      self.conv5_2 = objax.nn.Conv2D(nin=512, nout=512, k=3)
      self.relu5_2 = objax.functional.relu
      self.conv5_3 = objax.nn.Conv2D(nin=512, nout=512, k=3)
      self.relu5_3 = objax.functional.relu
      self.conv5_4 = objax.nn.Conv2D(nin=512, nout=512, k=3)
      self.relu5_4 = objax.functional.relu
      self.pool5 = max_pool_2d
  
      self.flatten = objax.functional.flatten
      self.fc6 = objax.nn.Linear(nin=512 * 7 * 7, nout=4096)
      self.relu6 = objax.functional.relu
      self.fc7 = objax.nn.Linear(nin=4096, nout=4096)
      self.relu7 = objax.functional.relu
      self.fc8 = objax.nn.Linear(nin=4096, nout=1000)
  
      if self.pretrained:
          for it in self.data_dict:
              if it.startswith("conv"):
                  conv = getattr(self, it)
                  kernel, bias = self.data_dict[it]
                  conv.w = objax.TrainVar(jn.array(kernel))
                  conv.b = objax.TrainVar(jn.array(bias[:, None, None]))
                  setattr(self, it, conv)
              elif it.startswith("fc"):
                  linear = getattr(self, it)
                  kernel, bias = self.data_dict[it]
                  if it == "fc6":
                      kernel = (
                          kernel.reshape([7, 7, 512, -1])
                          .transpose((2, 0, 1, 3))
                          .reshape([512 * 7 * 7, -1])
                      )
                  linear.w = objax.TrainVar(jn.array(kernel))
                  linear.b = objax.TrainVar(jn.array(bias))
                  setattr(self, it, linear)
  
      ops = [
          self.conv1_1,
          self.relu1_1,
          self.conv1_2,
          self.relu1_2,
          self.pool1,
          self.conv2_1,
          self.relu2_1,
          self.conv2_2,
          self.relu2_2,
          self.pool2,
          self.conv3_1,
          self.relu3_1,
          self.conv3_2,
          self.relu3_2,
          self.conv3_3,
          self.relu3_3,
          self.conv3_4,
          self.relu3_4,
          self.pool3,
          self.conv4_1,
          self.relu4_1,
          self.conv4_2,
          self.relu4_2,
          self.conv4_3,
          self.relu4_3,
          self.conv4_4,
          self.relu4_4,
          self.pool4,
          self.conv5_1,
          self.relu5_1,
          self.conv5_2,
          self.relu5_2,
          self.conv5_3,
          self.relu5_3,
          self.conv5_4,
          self.relu5_4,
          self.pool5,
          self.flatten,
          self.fc6,
          self.relu6,
          self.fc7,
          self.relu7,
          self.fc8,
      ]
  
      return ops
  
file_path: objax/objax/zoo/vgg.py
imports: import functools
  import os
  from urllib import request
  import jax.numpy
  import numpy
  import objax
label_desc: Use image node_id 2 for calling the VGG19 obj's underlying member method code with example usage: obj.build() and returns: ops