Skip to content

Commit 78acac4

Browse files
authored
Merge pull request spcl#2 from sancierra/patch-1
fix mean / std calculation in layernorm sdfg
2 parents cbfeff1 + dfb808c commit 78acac4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

substation/transformer_sdfg.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def meanstd(x: dace_dtype[B, SM, N]):
5454
smom << second_moment[i, j]
5555
mn >> mean[i, j]
5656
st >> std[i, j]
57-
mn = fmom / (SM * B)
58-
st = math.sqrt((smom / (SM*B)) - mn*mn)
57+
mn = fmom / N
58+
st = math.sqrt((smom / N) - mn*mn)
5959

6060
return mean, std
6161

0 commit comments

Comments
 (0)