"...paddleocr_onnxruntime.git" did not exist on "28b35296bcf407f55137d6877bf9d9d0c413645e"
Commit 44848e08 authored by Scott Zhu's avatar Scott Zhu Committed by A. Unique TensorFlower
Browse files

Fix unit test failure caused by the keras initializer change.

PiperOrigin-RevId: 453982185
parent a506d3a4
......@@ -66,7 +66,7 @@ class TNLayerTest(tf.test.TestCase, parameterized.TestCase):
def test_train(self, input_dim, proj_multiple):
data = np.random.randint(10, size=(100, input_dim))
model = self._build_model(data, proj_multiple)
tf.random.set_seed(0)
tf.keras.utils.set_random_seed(0)
model.compile(
optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
......@@ -81,7 +81,7 @@ class TNLayerTest(tf.test.TestCase, parameterized.TestCase):
@parameterized.parameters((768, 6), (1024, 2))
def test_weights_change(self, input_dim, proj_multiple):
tf.random.set_seed(0)
tf.keras.utils.set_random_seed(0)
data = np.random.randint(10, size=(100, input_dim))
model = self._build_model(data, proj_multiple)
model.compile(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment