diff --git a/test/test_network_ops/test_batch_norm_stats.py b/test/test_network_ops/test_batch_norm_stats.py index 1af3ea4324da5ab89a0ec8f63dd68f90d15bb112..665b6eac81d440ead869ad4219e17b94e723a6a0 100644 --- a/test/test_network_ops/test_batch_norm_stats.py +++ b/test/test_network_ops/test_batch_norm_stats.py @@ -37,6 +37,7 @@ class TestBatchNormStats(TestCase): return out_mean, out_invstd def test_batch_norm_stats(self, device="npu"): + np.random.seed(1234) shape_format = [ [[np.float16, -1, [2, 3, 12, 12]], 1e-5], ] diff --git a/test/test_network_ops/test_batchnorm_backward_reduce.py b/test/test_network_ops/test_batchnorm_backward_reduce.py index e252ff7bdf884d2138a98fa61d0274141984ff44..841daac02ddb17419731a94bf973b83b5740606b 100644 --- a/test/test_network_ops/test_batchnorm_backward_reduce.py +++ b/test/test_network_ops/test_batchnorm_backward_reduce.py @@ -36,6 +36,7 @@ class TestBatchNormBackwardReduce(TestCase): return list2 def test_batch_norm_backward_reduce_mix_precision(self, device="npu"): + np.random.seed(1234) shape_format = [ [[np.float16, -1, [1, 3, 9, 9]], [np.float32, -1, [3]], True, True, True], @@ -61,6 +62,7 @@ class TestBatchNormBackwardReduce(TestCase): self.assertRtolEqual(out16, out32) def test_batch_norm_backward_reduce(self, device="npu"): + np.random.seed(1234) shape_format = [ [[np.float32, -1, [1, 3, 9, 9]], [np.float32, -1, [3]], True, True, True], diff --git a/test/test_network_ops/test_batchnorm_gather_stats_with_counts.py b/test/test_network_ops/test_batchnorm_gather_stats_with_counts.py index 8bf7442958c3ea8c26d90210b510313683f8ac56..b7b3ad936d1477a3293d1c6fcb9c8d787f95a381 100644 --- a/test/test_network_ops/test_batchnorm_gather_stats_with_counts.py +++ b/test/test_network_ops/test_batchnorm_gather_stats_with_counts.py @@ -62,6 +62,7 @@ class TestBatchNormGatherStatsWithCounts(TestCase): return npu_counts def test_batch_norm_gather_stats_with_counts(self, device="npu"): + np.random.seed(1234) shape_format = [ [[np.float16, -1, [2, 3, 12, 12]], [np.float32, -1, [4, 3]], [np.float32, -1, [4, 3]], \ [np.float32, -1, [3]], [np.float32, -1, [3]], 1e-3, 1e-5, [np.float32, -1, [4]], 0], diff --git a/test/test_network_ops/test_npu_giou_backward.py b/test/test_network_ops/test_npu_giou_backward.py index 2176fde593a264f26fc9236415c35dc323d81527..66db6588441addd8478552ade1bced8bf9cf548f 100644 --- a/test/test_network_ops/test_npu_giou_backward.py +++ b/test/test_network_ops/test_npu_giou_backward.py @@ -53,6 +53,7 @@ class TestNpuGiouBackward(TestCase): return output, box1_grad, box2_grad def test_npu_giou_backward_shape_format(self): + np.random.seed(1234) shape_list1 = [ [1, 1] ]