Show / Hide Table of Contents

    Operator ( ~- )

    static member ( ~- ): Tensor<'T> -> Tensor<'T>

    Element-wise negation.

    Declaration
    static member ( ~- ): a:Tensor<'T> -> Tensor<'T>
    Parameters
    Type Name Description
    Tensor<'T> a

    The tensor to operate on.

    Returns
    Type Description
    Tensor<'T>

    A new tensor containing the result of this operation.

    Remarks

    Negates each element of tensor a and returns the result as a new tensor.

    Examples
     let a = HostTensor.ofList [5.0; 6.0; 7.0]
     let c = -a  // c = [-5.0; -6.0; -7.0]
    See Also
    member FillNegate: Tensor<bool> -> unit
    Back to top Generated by DocFX