code: def get_config():
      logger.auto_set_dir()
  
      dataset_train, dataset_test = get_data(True), get_data(False)
      steps_per_epoch = len(dataset_train) * 5
  
      return TrainConfig(
          model=Model(),
          data=QueueInput(dataset_train),
          callbacks=[
              ModelSaver(),
              InferenceRunner(
                  dataset_test,
                  [ScalarStats("cost"), ClassificationError()],
              ),
              ScheduledHyperParamSetter("learning_rate", [(200, 1e-4)]),
          ],
          steps_per_epoch=steps_per_epoch,
          max_epoch=500,
      )
  
file_path: tensorpack/examples/SpatialTransformer/mnist-addition.py
imports: import argparse
  import numpy
  import os
  import cv2
  from tensorpack import tfv1
  from tensorpack import *
  from tensorpack.dataflow import dataset
  from tensorpack.tfutils import gradproc, optimizer, summary
label_desc: Use image node_id 5 for calling a global function with example usage: get_config() and returns: TrainConfig