• Computes the power of one tf.Tensor to another. Supports broadcasting.

    Given a tf.Tensor x and a tf.Tensor y, this operation computes x^y for corresponding elements in x and y. The result's dtype will be the upcasted type of the base and exp dtypes.

    const a = tf.tensor([[2, 3], [4, 5]])
    const b = tf.tensor([[1, 2], [3, 0]]).toInt();

    a.pow(b).print(); // or tf.pow(a, b)
    const a = tf.tensor([[1, 2], [3, 4]])
    const b = tf.tensor(2).toInt();

    a.pow(b).print(); // or tf.pow(a, b)

    We also expose powStrict which has the same signature as this op and asserts that base and exp are the same shape (does not broadcast).

    Type Parameters

    Parameters

    Returns T

    Doc

Generated using TypeDoc