code: def build_graph(self, theta, image, gt_image, gt_filter):
      kernel_size = 9
  
      theta = tf.reshape(theta, [BATCH, 1, 1, 1]) - np.pi
      image = tf.reshape(image, [BATCH, SHAPE, SHAPE, 1])
      gt_image = tf.reshape(gt_image, [BATCH, SHAPE, SHAPE, 1])
  
      pred_filter = self._parameter_net(theta)
      pred_image = DynamicConvFilter(
          "dfn", image, pred_filter, 1, kernel_size
      )
  
      with tf.name_scope("visualization"):
          pred_filter = tf.reshape(
              pred_filter, [BATCH, kernel_size, kernel_size, 1]
          )
          gt_filter = tf.reshape(
              gt_filter, [BATCH, kernel_size, kernel_size, 1]
          )
  
          filters = tf.concat(
              [pred_filter, gt_filter], axis=2, name="filters"
          )
          images = tf.concat(
              [pred_image, gt_image], axis=2, name="images"
          )
      tf.summary.image("pred_gt_filters", filters, max_outputs=20)
      tf.summary.image("pred_gt_images", images, max_outputs=20)
  
      cost = tf.reduce_mean(
          tf.squared_difference(pred_image, gt_image), name="cost"
      )
      summary.add_moving_summary(cost)
      return cost
  
imports: import argparse
  import multiprocessing
  import numpy
  import cv2
  import tensorflow
  from scipy.signal import convolve2d
  from tensorpack import *
  from tensorpack.dataflow import dataset
  from tensorpack.utils import logger
  from tensorpack.utils.gpu import change_gpu
  from tensorpack.utils.argtools import shape2d, shape4d
  from tensorpack.utils.viz import *
label_desc: Use image node_id 3 for calling the Model obj's underlying member method code with example usage: obj.build_graph(theta, image, gt_image, gt_filter) and returns: cost