From a367753eda595f01a60e4ccb12845f2675cb37c5 Mon Sep 17 00:00:00 2001 From: Scott Zhu Date: Sun, 20 Nov 2022 10:39:59 -0800 Subject: [PATCH] Internal change PiperOrigin-RevId: 489824381 --- .../vision/gesture_recognizer/gesture_recognizer_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mediapipe/model_maker/python/vision/gesture_recognizer/gesture_recognizer_test.py b/mediapipe/model_maker/python/vision/gesture_recognizer/gesture_recognizer_test.py index 39272cbbc..9cee88362 100644 --- a/mediapipe/model_maker/python/vision/gesture_recognizer/gesture_recognizer_test.py +++ b/mediapipe/model_maker/python/vision/gesture_recognizer/gesture_recognizer_test.py @@ -14,7 +14,6 @@ import io import os -import random import tempfile from unittest import mock as unittest_mock import zipfile @@ -27,6 +26,7 @@ from mediapipe.model_maker.python.vision import gesture_recognizer from mediapipe.tasks.python.test import test_utils _TEST_DATA_DIR = 'mediapipe/model_maker/python/vision/gesture_recognizer/test_data' +tf.keras.backend.experimental.enable_tf_random_generator() class GestureRecognizerTest(tf.test.TestCase): @@ -42,7 +42,7 @@ class GestureRecognizerTest(tf.test.TestCase): def setUp(self): super().setUp() - random.seed(1234) + tf.keras.utils.set_random_seed(87654321) all_data = self._load_data() # Splits data, 90% data for training, 10% for validation self._train_data, self._validation_data = all_data.split(0.9)