eq

fun Tensor<Double>.eq(other: Tensor<Double>, epsilon: Double): Boolean(source)

Compares element-wise two tensors with a specified precision.

Return

true if two tensors have the same shape and elements, false otherwise.

Parameters

other

the tensor to compare with input tensor.

epsilon

permissible error when comparing two Double values.


infix fun Tensor<Double>.eq(other: Tensor<Double>): Boolean(source)

Compares element-wise two tensors. Comparison of two Double values occurs with 1e-5 precision.

Return

true if two tensors have the same shape and elements, false otherwise.

Parameters

other

the tensor to compare with input tensor.