Show / Hide Table of Contents

    Method isClose

    static member isClose: Tensor<'T> * Tensor<'T> * 'T option * 'T option -> Tensor<bool>

    Element-wise check if two tensors have same (within machine precision) values.

    Declaration
    static member isClose: a:Tensor<'T> * b:Tensor<'T> * absTol:'T option * relTol:'T option -> Tensor<bool>
    Parameters
    Type Name Description
    Tensor<'T> a

    The tensor on the left side of this binary operation.

    Tensor<'T> b

    The tensor on the right side of this binary operation.

    'T option absTol

    The absolute tolerance. (default 1e-8)

    'T option relTol

    The relative tolerance. (default 1e-5)

    Returns
    Type Description
    Tensor<bool>

    A new tensor containing the result of this operation.

    Remarks

    Test each element of tensor a for being almost equal to the corresponding element of tensor b and returns the results as a new tensor. For integer data types the check is exact.

    The tensors a and b must have the same storage and type.

    Back to top Generated by DocFX