ml: relax handwriting unit test a bit to make it pass on ARM

On ARM boards, the output of handwriting model is a bit different
possibly due to 32-bit. Relax the unit test a bit to make it pass on
ARM boards.

BUG=b:171253232
TEST=FEATURES=test emerge-nocturne ml
TEST=FEATURES=test emerge-kukui ml

Change-Id: Id6d93548c08aedb0c57aa4bc5f7727f193633aa0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2491160
Reviewed-by: Andrew Moylan <amoylan@chromium.org>
Commit-Queue: Honglin Yu <honglinyu@chromium.org>
Tested-by: Honglin Yu <honglinyu@chromium.org>
diff --git a/ml/machine_learning_service_impl_test.cc b/ml/machine_learning_service_impl_test.cc
index a0634cf..98df514 100644
--- a/ml/machine_learning_service_impl_test.cc
+++ b/ml/machine_learning_service_impl_test.cc
@@ -1152,7 +1152,7 @@
                         HandwritingRecognizerResult::Status::OK);
               ASSERT_EQ(result->candidates.size(), 1);
               EXPECT_EQ(result->candidates.at(0)->text, text);
-              EXPECT_FLOAT_EQ(result->candidates.at(0)->score, score);
+              EXPECT_NEAR(result->candidates.at(0)->score, score, 1e-4);
               *infer_callback_done = true;
             },
             &infer_callback_done, text, score));
@@ -1184,7 +1184,7 @@
     request_.mutable_ink()->mutable_strokes(0)->mutable_points(i)->set_t(i * i *
                                                                          100);
   }
-  ExpectRecognizeResult("a", 0.51218414f);
+  ExpectRecognizeResult("a", 0.5121f);
 }
 
 // Tests that the LoadHandwritingModel also perform as expected.