From 5a8642700423c38f0dfb76d310b8cdec9d68f88e Mon Sep 17 00:00:00 2001 From: Guoxia Wang Date: Thu, 13 Apr 2023 11:38:19 +0800 Subject: [PATCH] add uint16 for bfloat16 dtype check in layer_norm under static mode (#52845) --- python/paddle/nn/functional/norm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/nn/functional/norm.py b/python/paddle/nn/functional/norm.py index 95e1ca2504c..8078cf237ce 100644 --- a/python/paddle/nn/functional/norm.py +++ b/python/paddle/nn/functional/norm.py @@ -337,7 +337,7 @@ def layer_norm( else: check_variable_and_dtype( - x, 'input', ['float16', 'float32', 'float64'], 'LayerNorm' + x, 'input', ['uint16', 'float16', 'float32', 'float64'], 'LayerNorm' ) inputs = {} -- GitLab