From cec28069c3bfafe8675bc840098af7128d25a29d Mon Sep 17 00:00:00 2001 From: Liang Shuhao Date: Fri, 12 Jun 2026 17:00:57 +0800 Subject: [PATCH] fix rules for gaussian op --- tester/paddle_to_torch/rules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tester/paddle_to_torch/rules.py b/tester/paddle_to_torch/rules.py index 81edf27e..0aea8086 100644 --- a/tester/paddle_to_torch/rules.py +++ b/tester/paddle_to_torch/rules.py @@ -7204,7 +7204,7 @@ def apply(self, paddle_api: str) -> ConvertResult: } dtype_val = locals().get("dtype") torch_dtype = dtype_map.get(str(dtype_val).split(".")[-1], torch.float32) -result = torch.normal(mean=float(mean), std=float(std), size=list(shape)).to(torch_dtype) +result = torch.empty(list(shape), dtype=torch_dtype).normal_(mean=float(mean), std=float(std)) """ code = Code(core=core.splitlines()) return ConvertResult.success(paddle_api, code, is_torch_corresponding=False)