• Computes the cumulative product of a tf.Tensor along axis.

    const x = tf.tensor([1, 2, 3, 4]);
    x.cumprod().print();
    const x = tf.tensor([[1, 2], [3, 4]]);
    x.cumprod().print();

    Type Parameters

    Parameters

    • x: Tensor<Rank> | TensorLike

      The input tensor to cumulatively multiply.

    • Optional axis: number

      The axis along which to multiply. Optional. Defaults to 0.

    • Optional exclusive: boolean

      Whether to perform exclusive cumulative product. Optional. Defaults to false. If set to true then the product of each tensor entry does not include its own value, but only the values previous to it along the specified axis.

    • Optional reverse: boolean

      Whether to multiply in the opposite direction. Optional. Defaults to false.

    Returns T

    Doc

Generated using TypeDoc