Show / Hide Table of Contents

    Method Truncate

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

    Element-wise truncation (rounding towards zero).

    Declaration
    static member Truncate: 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 truncation (rounding towards zero) of each element of the specified tensor and returns them as a new tensor. Do not call this function directly; instead use the F# truncate function.

    Examples
     let a = HostTensor.ofList [-3.0; -2.7; 2.7; 3.0]
     let b = truncate a // b = [-3.0; -2.0; 2.0; 3.0]
    See Also
    member FillTruncate: Tensor<'T> -> unit
    Back to top Generated by DocFX