parameters: (self, numTimeSteps, numOutput, graph=None,
                   stepSize=0.001, lossType='l2', optimizer='Adam',
                   automode=True)
docstring: The EMI-RNN trainer. This classes attaches loss functions and training
          operations to the forward EMI-RNN graph. Currently, simple softmax loss
          and l2 loss are supported on the outputs. For optimizers, only ADAM
          optimizer is available.
  
          numTimesteps: Number of time steps of the RNN model
          numOutput: Number of output classes
          graph: This module supports restoring from a meta graph. Provide the
              meta graph as an argument to enable this behaviour.
          lossType: A valid loss type string in ['l2', 'xentropy'].
          optimizer: A valid optimizer string in ['Adam'].
          automode: Disable or enable the automode behaviour.
          This module takes care of all of the training procedure automatically,
          and the default behaviour is suitable for most cases. In certain cases
          though, the user would want to change certain aspects of the graph;
          specifically, he would want to change to loss operation by, say, adding
          regularization terms for the model matrices. To enable this behaviour,
          the user can perform the following steps:
              1. Disable automode. That is, when initializing, set automode=False
              2. After the __call__ method has been invoked to create the loss
              operation, the user can access the self.lossOp attribute and modify
              it by adding regularization or other terms.
              3. After the modification has been performed, the user needs to
              call the `createOpCollections()` method so that the newly edited
              operations can be added to Tensorflow collections.
docstring_summary: The EMI-RNN trainer. This classes attaches loss functions and training
          operations to the forward EMI-RNN graph. Currently, simple softmax loss
          and l2 loss are supported on the outputs. For optimizers, only ADAM
          optimizer is available.
docstring_tokens: The EMI - RNN trainer . This classes attaches loss functions and training operations to the forward EMI - RNN graph . Currently simple softmax loss and l2 loss are supported on the outputs . For optimizers only ADAM optimizer is available .
function: def __init__(self, numTimeSteps, numOutput, graph=None,
                   stepSize=0.001, lossType='l2', optimizer='Adam',
                   automode=True):
          '''
          The EMI-RNN trainer. This classes attaches loss functions and training
          operations to the forward EMI-RNN graph. Currently, simple softmax loss
          and l2 loss are supported on the outputs. For optimizers, only ADAM
          optimizer is available.
  
          numTimesteps: Number of time steps of the RNN model
          numOutput: Number of output classes
          graph: This module supports restoring from a meta graph. Provide the
              meta graph as an argument to enable this behaviour.
          lossType: A valid loss type string in ['l2', 'xentropy'].
          optimizer: A valid optimizer string in ['Adam'].
          automode: Disable or enable the automode behaviour.
          This module takes care of all of the training procedure automatically,
          and the default behaviour is suitable for most cases. In certain cases
          though, the user would want to change certain aspects of the graph;
          specifically, he would want to change to loss operation by, say, adding
          regularization terms for the model matrices. To enable this behaviour,
          the user can perform the following steps:
              1. Disable automode. That is, when initializing, set automode=False
              2. After the __call__ method has been invoked to create the loss
              operation, the user can access the self.lossOp attribute and modify
              it by adding regularization or other terms.
              3. After the modification has been performed, the user needs to
              call the `createOpCollections()` method so that the newly edited
              operations can be added to Tensorflow collections.
          '''
          self.numTimeSteps = numTimeSteps
          self.numOutput = numOutput
          self.graph = graph
          self.stepSize = stepSize
          self.lossType = lossType
          self.optimizer = optimizer
          self.automode = automode
          self.__validInit = False
          self.graphCreated = False
          # Operations to be restored
          self.lossOp = None
          self.trainOp = None
          self.softmaxPredictions = None
          self.accTilda = None
          self.equalTilda = None
          self.lossIndicatorTensor = None
          self.lossIndicatorPlaceholder = None
          self.lossIndicatorAssignOp = None
          # Input validation
          self.supportedLosses = ['xentropy', 'l2']
          self.supportedOptimizers = ['Adam']
          assert lossType in self.supportedLosses
          assert optimizer in self.supportedOptimizers
          # Internal
          self.scope = 'EMI/Trainer/'
function_tokens: def __init__ ( self , numTimeSteps , numOutput , graph = None , stepSize = 0.001 , lossType = 'l2' , optimizer = 'Adam' , automode = True ) : self . numTimeSteps = numTimeSteps self . numOutput = numOutput self . graph = graph self . stepSize = stepSize self . lossType = lossType self . optimizer = optimizer self . automode = automode self . __validInit = False self . graphCreated = False # Operations to be restored self . lossOp = None self . trainOp = None self . softmaxPredictions = None self . accTilda = None self . equalTilda = None self . lossIndicatorTensor = None self . lossIndicatorPlaceholder = None self . lossIndicatorAssignOp = None # Input validation self . supportedLosses = [ 'xentropy' , 'l2' ] self . supportedOptimizers = [ 'Adam' ] assert lossType in self . supportedLosses assert optimizer in self . supportedOptimizers # Internal self . scope = 'EMI/Trainer/'