Function logaddexp2

  • Calculates:

    output = log2(exp2(input) + exp2(other))
    

    Gradient:

    var ein = exp2(input); var eoth = exp2(other); var sum_ein_eoth = ein + eoth; inputGrad = outputGrad * (ein / sum_ein_eoth); otherGrad = outputGrad * (eoth / sum_ein_eoth );
    

    Parameters

    • input: Tensor

      the input tensor of any shape

    • other: number | Tensor

      the other tensor whose shape is broadcastable with the input tensor

    Returns Tensor

    the output tensor

Generated using TypeDoc