已合并
fix ut #25306
daifu1234567创建于 2025年9月26日
fix ut #25306
已合并
共 1 个文件变更+1-0
| @@ -102,6 +102,7 @@ class TestBinaryCrossEntropyWithLogits(TestCase): | |||
| 102 | ((10, 64), (10, 64), (10, 64), "mean"), | 102 | ((10, 64), (10, 64), (10, 64), "mean"), |
| 103 | ((10, 64), (10, 64), (10, 64), "none") | 103 | ((10, 64), (10, 64), (10, 64), "none") |
| 104 | ]: | 104 | ]: |
| 105 | + np.random.seed(42) | ||
| 105 | input1 = self.generate_one_input(0, 10, shape, np.float16) | 106 | input1 = self.generate_one_input(0, 10, shape, np.float16) |
| 106 | target = torch.empty(shape, dtype=torch.float16).random_(2) | 107 | target = torch.empty(shape, dtype=torch.float16).random_(2) |
| 107 | input_32 = input1.type(torch.float32) | 108 | input_32 = input1.type(torch.float32) |