def TrainOneBatch(self, step):
    """Train using one mini-batch.
    Args:
      step: Training step.
    """
    """
    if step > self.code_layer.hyperparams.switch_on_sc_alpha_after:
      self.code_layer.hyperparams.sc_alpha = 1.0
    """
    self.ForwardPropagate(train=True)
    losses = self.GetLoss(train=True)
    self.UpdateParameters(step)
    return losses
Train using one mini-batch.
    Args:
      step: Training step.
    
deepnet/sparse_coder.py