parameters: (op, grad)
docstring: Returns grad * (1 - tanh(x) * tanh(x)).
docstring_summary: Returns grad * (1 - tanh(x) * tanh(x)).
docstring_tokens: Returns grad * ( 1 - tanh ( x ) * tanh ( x )) .
function: def _TanhGrad(op, grad):
    """Returns grad * (1 - tanh(x) * tanh(x))."""
    y = op.outputs[0]  # y = tanh(x)
    with ops.control_dependencies([grad.op]):
      if y.dtype.is_complex:
        y = math_ops.conj(y)
      return gen_math_ops._tanh_grad(y, grad)
function_tokens: def _TanhGrad ( op , grad ) : y = op . outputs [ 0 ] # y = tanh(x) with ops . control_dependencies ( [ grad . op ] ) : if y . dtype . is_complex : y = math_ops . conj ( y ) return gen_math_ops . _tanh_grad ( y , grad )