Function mgb::debug::compare_tensor_value

Function Documentation

Maybe<std::string> mgb::debug::compare_tensor_value(const HostTensorND &expect, const char *expect_expr, const HostTensorND &get, const char *get_expr, float maxerr)

check whether absolute/relative error for each element is not greater than maxerr

Return

None if tensors are considered equal; or a human-readable message indicating their difference