Show / Hide Table of Contents

    Method Abs

    static member Abs: Tensor<'T> -> Tensor<'T>

    Element-wise absolute value.

    Declaration
    static member Abs: a:Tensor<'T> -> Tensor<'T>
    Parameters
    Type Name Description
    Tensor<'T> a

    The tensor to apply this operation to.

    Returns
    Type Description
    Tensor<'T>

    A new tensor containing the result of this operation.

    Remarks

    Computes the absolute value of each element of the specified tensor and returns them as a new tensor. Do not call this function directly; instead use the F# abs function.

    Examples
     let a = HostTensor.ofList [-2; -1; 1]
     let b = abs a // b = [2; 1; 1]
    See Also
    member FillAbs: Tensor<'T> -> unit
    Back to top Generated by DocFX