code: def get_config():
      logger.set_logger_dir(
          os.path.join(
              "train_log", "svhn-dorefa-{}".format(args.dorefa)
          )
      )
  
      # prepare dataset
      d1 = dataset.SVHNDigit("train")
      d2 = dataset.SVHNDigit("extra")
      data_train = RandomMixData([d1, d2])
      data_test = dataset.SVHNDigit("test")
  
      augmentors = [
          imgaug.Resize((40, 40)),
          imgaug.Brightness(30),
          imgaug.Contrast((0.5, 1.5)),
      ]
      data_train = AugmentImageComponent(data_train, augmentors)
      data_train = BatchData(data_train, 128)
      data_train = MultiProcessRunnerZMQ(data_train, 5)
  
      augmentors = [imgaug.Resize((40, 40))]
      data_test = AugmentImageComponent(data_test, augmentors)
      data_test = BatchData(data_test, 128, remainder=True)
  
      return TrainConfig(
          data=QueueInput(data_train),
          callbacks=[
              ModelSaver(),
              InferenceRunner(
                  data_test,
                  [
                      ScalarStats("cost"),
                      ClassificationError("wrong_tensor"),
                  ],
              ),
          ],
          model=Model(),
          max_epoch=200,
      )
  
file_path: tensorpack/examples/DoReFa-Net/svhn-digit-dorefa.py
imports: import argparse
  import os
  import tensorflow
  from tensorpack import *
  from tensorpack.dataflow import dataset
  from tensorpack.tfutils.summary import add_moving_summary, add_param_summary
  from tensorpack.tfutils.varreplace import remap_variables
  from dorefa import get_dorefa
label_desc: Use image node_id 1 for calling a global function with example usage: get_config() and returns: TrainConfig