Skip to content

Fixed LayerNormalization eps bug#589

Merged
sunshinemyson merged 1 commit intoVeriSilicon:mainfrom
shijie-nv:bugfix-001
May 22, 2023
Merged

Fixed LayerNormalization eps bug#589
sunshinemyson merged 1 commit intoVeriSilicon:mainfrom
shijie-nv:bugfix-001

Conversation

@shijie-nv
Copy link
Contributor

In the previous version, due to the wrong data type and parameters, the eps of layernorm cannot be set correctly, and it is always 0.
It will cause "nan" to appear in the output.

BUG results
test_LayerNorm_1_fp32
input:
-2 2 -2 2 -2 2
-2 0 2 -2 0 2
2 2 2 2 2 2
0 1 2 3 4 5
output:
-1 1 -1 1 -1 1
-1.22474 0 1.22474 -1.22474 0 1.22474
-nan -nan -nan -nan -nan -nan
-1.46385 -0.87831 -0.29277 0.29277 0.87831 1.46385

@sunshinemyson sunshinemyson merged commit 51faf28 into VeriSilicon:main May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants