class_docstr: The base trainer class. Given an object of `hparams`, a trainer
  creates and initializes a model. After initialization, the method
  `model_train` can be used to train the model.
class_docstr_tok: ["The","base","trainer","class",".","Given","an","object","of","`","hparams","`",",","a","trainer","creates","and","initializes","a","model",".","After","initialization",",","the","method","`","model_train","`","can","be","used","to","train","the","model","."]
docstr: :param hparams: An instance of collections.namedtuple specifying the
                  model type and training configs. The parameters are
                  documented in `run_multigpu.py`.
docstr_tok: [":","param","hparams",":","An","instance","of","collections.namedtuple","specifying","the","model","type","and","training","configs",".","The","parameters","are","documented","in","`","run_multigpu.py","`","."]
code: def __init__(self, hparams):
      """
      :param hparams: An instance of collections.namedtuple specifying the
                      model type and training configs. The parameters are
                      documented in `run_multigpu.py`.
      """
      self.hparams = hparams
      self.batch_size = hparams.batch_size
      self.evaluate = None
      self.step_num = 0
      self.report = None
      self._init_session()
      self._init_data()
      self._init_inputs()
      self._init_model()
      self._create_train_graph()
      self._init_eval()
      self.runner = None
  
imports: from collections import OrderedDict
  import logging
  import math
  import time
  import os
  import numpy
  import six
  import tensorflow
  from cleverhans.utils_tf import batch_indices
  from cleverhans.utils_mnist import data_mnist
  import utils_cifar
  import utils_svhn
  from utils import preprocess_batch
  from make_model import make_model
  from evaluator import Evaluator
  from evaluator import create_adv_by_name
  from model import clone_variable
label_desc: Use image node_id 1 to create a new TrainManager object from inherited base classes: object with example: obj = TrainManager(hparams)