ClikaRT::ops::allclose
function
allclose()
Tensor allclose(
Tensor a,
Tensor b,
double rtol = 1e-5,
double atol = 1e-8,
bool equal_nan = false
)
Whether EVERY elementwise pair is approximately equal, a reduction to one verdict.
Shapes broadcast per the standard rules before the reduction.
Parameters
a,b— the tensors to compare.rtol: relative tolerance; default1e-5.atol: absolute tolerance; default1e-8.equal_nan: whentrue, NaN compares equal to NaN; defaultfalse.
Returns: a 0-D Bool tensor; true iff every pair passes (use ops::isclose for the elementwise map).
Throws
-
ClikaRT::Error: (INVALID_ARGUMENT) when the operand shapes are not broadcast-compatible.bool same = ClikaRT::ops::allclose(y, want).item<bool>();
Declared in ClikaRT/compute/ops.h, line 1645