Avoid numerical stability issues in MEAN test

Fix flaky test in XNNPACK delegate

PiperOrigin-RevId: 316176756
Change-Id: I24ca84f807708f58971f3e29251734e5db8505fc
This commit is contained in:
Marat Dukhan 2020-06-12 14:22:28 -07:00 committed by TensorFlower Gardener
parent 7a33771b76
commit e665a737f9
1 changed files with 2 additions and 2 deletions

View File

@ -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<float>(-15.0f, 15.0f), std::ref(rng));
auto input_rng =
std::bind(std::uniform_real_distribution<float>(), std::ref(rng));
std::vector<char> buffer = CreateTfLiteModel(reduce_op);
const Model* model = GetModel(buffer.data());