def ComputeDeriv(self):
    """Compute derivative w.r.t input given derivative w.r.t output."""
    self.deriv.apply_tanh_deriv(self.state)
    if self.hyperparams.dropout:
      self.deriv.mult(self.mask)
Compute derivative w.r.t input given derivative w.r.t output.
deepnet/tanh_layer.py