Пример #1
0
def _InvGradGrad(op, grad):
  b = op.inputs[1]
  # op.output[0]: y = -b * conj(a)^2
  with ops.control_dependencies([grad.op]):
    ca = math_ops.conj(op.inputs[0])
    cg = math_ops.conj(grad)
    # pylint: disable=protected-access
    return cg * -2.0 * b * ca, gen_math_ops._inv_grad(ca, grad)
Пример #2
0
def _InvGradGrad(op, grad):
    b = op.inputs[1]
    # op.output[0]: y = -b * conj(a)^2
    with ops.control_dependencies([grad.op]):
        ca = math_ops.conj(op.inputs[0])
        cg = math_ops.conj(grad)
        # pylint: disable=protected-access
        return cg * -2.0 * b * ca, gen_math_ops._inv_grad(ca, grad)
Пример #3
0
def _InvGrad(op, grad):
  """Returns -grad * (1 / x^2)."""
  y = op.outputs[0]  # y = 1 / x
  # pylint: disable=protected-access
  return gen_math_ops._inv_grad(y, grad)
Пример #4
0
def _InvGrad(op, grad):
    """Returns -grad * (1 / x^2)."""
    y = op.outputs[0]  # y = 1 / x
    # pylint: disable=protected-access
    return gen_math_ops._inv_grad(y, grad)
Пример #5
0
def _InvGrad(op, grad):
    """Returns -grad * (1 / x^2)."""
    y = op.outputs[0]  # y = 1 / x
    return gen_math_ops._inv_grad(y, grad)
Пример #6
0
def _InvGrad(op, grad):
    """Returns -grad * (1 / x^2)."""
    y = op.outputs[0]  # y = 1 / x
    return gen_math_ops._inv_grad(y, grad)