Skip to content

Commit f61cc7f

Browse files
committed
fix accuracy fused_layer_norm
1 parent 6576bb1 commit f61cc7f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tester/accuracy.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,11 @@ def test(self):
264264
one = torch.tensor(1.0, dtype=torch.float64)
265265
paddle_output.append([coef_vector, abs_coef])
266266
torch_output.append([coef_vector_approx, one])
267+
elif self.api_config.api_name == "paddle.incubate.nn.functional.fused_layer_norm":
268+
paddle_output, torch_output = zip(*(
269+
(p, t) for p, t in zip(paddle_output, torch_output) if p._is_initialized()
270+
))
271+
267272

268273
self.is_backward = False
269274
if isinstance(paddle_output, paddle.Tensor):

0 commit comments

Comments
 (0)