code: def build_graph(self):
      # inputs placeholder
      self.inputs = Feature(
          shape=(None, self.image_size, self.image_size, 3),
          dtype=tf.float32,
      )
      # data preprocessing and augmentation
      in_layer = DRAugment(
          self.augment,
          self.batch_size,
          size=(self.image_size, self.image_size),
          in_layers=[self.inputs],
      )
      # first conv layer
      in_layer = Conv2D(
          self.n_init_kernel,
          kernel_size=7,
          activation_fn=None,
          in_layers=[in_layer],
      )
      in_layer = BatchNorm(in_layers=[in_layer])
      in_layer = ReLU(in_layers=[in_layer])
  
      # downsample by max pooling
      res_in = MaxPool2D(
          ksize=[1, 3, 3, 1], strides=[1, 2, 2, 1], in_layers=[in_layer]
      )
  
      for ct_module in range(self.n_downsample - 1):
          # each module is a residual convolutional block
          # followed by a convolutional downsample layer
          in_layer = Conv2D(
              self.n_init_kernel * 2 ** (ct_module - 1),
              kernel_size=1,
              activation_fn=None,
              in_layers=[res_in],
          )
          in_layer = BatchNorm(in_layers=[in_layer])
          in_layer = ReLU(in_layers=[in_layer])
          in_layer = Conv2D(
              self.n_init_kernel * 2 ** (ct_module - 1),
              kernel_size=3,
              activation_fn=None,
              in_layers=[in_layer],
          )
          in_layer = BatchNorm(in_layers=[in_layer])
          in_layer = ReLU(in_layers=[in_layer])
          in_layer = Conv2D(
              self.n_init_kernel * 2**ct_module,
              kernel_size=1,
              activation_fn=None,
              in_layers=[in_layer],
          )
          res_a = BatchNorm(in_layers=[in_layer])
  
          res_out = res_in + res_a
          res_in = Conv2D(
              self.n_init_kernel * 2 ** (ct_module + 1),
              kernel_size=3,
              stride=2,
              in_layers=[res_out],
          )
          res_in = BatchNorm(in_layers=[res_in])
  
      # max pooling over the final outcome
      in_layer = ReduceMax(axis=(1, 2), in_layers=[res_in])
  
      for layer_size in self.n_fully_connected:
          # fully connected layers
          in_layer = Dense(
              layer_size, activation_fn=tf.nn.relu, in_layers=[in_layer]
          )
          # dropout for dense layers
          # in_layer = Dropout(0.25, in_layers=[in_layer])
  
      logit_pred = Dense(
          self.n_tasks * self.n_classes,
          activation_fn=None,
          in_layers=[in_layer],
      )
      logit_pred = Reshape(
          shape=(None, self.n_tasks, self.n_classes),
          in_layers=[logit_pred],
      )
  
      weights = Weights(shape=(None, self.n_tasks))
      labels = Label(shape=(None, self.n_tasks), dtype=tf.int32)
  
      output = SoftMax(logit_pred)
      self.add_output(output)
      loss = SparseSoftMaxCrossEntropy(in_layers=[labels, logit_pred])
      weighted_loss = WeightedError(in_layers=[loss, weights])
  
      # weight decay regularizer
      # weighted_loss = WeightDecay(0.1, 'l2', in_layers=[weighted_loss])
      self.set_loss(weighted_loss)
  
imports: import numpy
  import tensorflow
  from deepchem.data import NumpyDataset, pad_features
  from deepchem.metrics import to_one_hot
  from deepchem.models.tensorgraph.layers import Layer, Dense, SoftMax, Reshape, SparseSoftMaxCrossEntropy, BatchNorm, Conv2D, MaxPool2D, WeightedError, Dropout, ReLU, Stack, Flatten, ReduceMax, WeightDecay
  from deepchem.models.tensorgraph.layers import L2Loss, Label, Weights, Feature
  from deepchem.models.tensorgraph.tensor_graph import TensorGraph
  from deepchem.trans import undo_transforms
  from deepchem.data.data_loader import ImageLoader
  from sklearn.metrics import confusion_matrix, accuracy_score
label_desc: Use image node_id 2 for calling the DRModel obj's underlying member method code with example usage: obj.build_graph() without return types