From e665a737f90564cd143fdc1b15420720596d17e1 Mon Sep 17 00:00:00 2001 From: Marat Dukhan Date: Fri, 12 Jun 2020 14:22:28 -0700 Subject: [PATCH] Avoid numerical stability issues in MEAN test Fix flaky test in XNNPACK delegate PiperOrigin-RevId: 316176756 Change-Id: I24ca84f807708f58971f3e29251734e5db8505fc --- tensorflow/lite/delegates/xnnpack/reduce_tester.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorflow/lite/delegates/xnnpack/reduce_tester.cc b/tensorflow/lite/delegates/xnnpack/reduce_tester.cc index 3bbf1528c76..edd09ba9d07 100644 --- a/tensorflow/lite/delegates/xnnpack/reduce_tester.cc +++ b/tensorflow/lite/delegates/xnnpack/reduce_tester.cc @@ -37,8 +37,8 @@ void ReduceTester::Test(tflite::BuiltinOperator reduce_op, TfLiteDelegate* delegate) const { std::random_device random_device; auto rng = std::mt19937(random_device()); - auto input_rng = std::bind( - std::uniform_real_distribution(-15.0f, 15.0f), std::ref(rng)); + auto input_rng = + std::bind(std::uniform_real_distribution(), std::ref(rng)); std::vector buffer = CreateTfLiteModel(reduce_op); const Model* model = GetModel(buffer.data());