def TrainOneBatch(self, step):
    """Train once on one mini-batch.

    Args:
      step: Training step.
    Returns:
      List of losses incurred at each output layer.
    """
    losses1 = self.ForwardPropagate(train=True)
    losses2 = self.BackwardPropagate(step)
    losses1.extend(losses2)
    return losses1
Train once on one mini-batch.

    Args:
      step: Training step.
    Returns:
      List of losses incurred at each output layer.
    
deepnet/neuralnet.py