diff --git a/test/xpu/test_layer_norm_op_xpu.py b/test/xpu/test_layer_norm_op_xpu.py index 1b98c4fe081b47..cd2a42f5c1cd17 100644 --- a/test/xpu/test_layer_norm_op_xpu.py +++ b/test/xpu/test_layer_norm_op_xpu.py @@ -44,6 +44,8 @@ def ref_layer_norm(x, scale, bias, epsilon, begin_norm_axis=1): if bias is not None: y = y + bias.reshape([1, right]) x.shape, y.shape = x_shape, x_shape + mean.shape = x_shape[0:begin_norm_axis] + variance.shape = x_shape[0:begin_norm_axis] return y, mean, variance