From 353ede5aef34c6c27f498f1bb36af126a131ef1b Mon Sep 17 00:00:00 2001 From: WangXi Date: Tue, 17 May 2022 15:25:28 +0800 Subject: [PATCH] add_n api support float16 (#42801) --- python/paddle/tensor/math.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/tensor/math.py b/python/paddle/tensor/math.py index d1d8581766..9e2384a8d9 100644 --- a/python/paddle/tensor/math.py +++ b/python/paddle/tensor/math.py @@ -1388,10 +1388,10 @@ def add_n(inputs, name=None): if len(inputs) > 0: for input in inputs: check_variable_and_dtype(input, "inputs", \ - ['float32', 'float64', 'int32', 'int64'], 'add_n') + ['float16', 'float32', 'float64', 'int32', 'int64'], 'add_n') else: check_variable_and_dtype(inputs, "inputs", \ - ['float32', 'float64', 'int32', 'int64'], 'add_n') + ['float16', 'float32', 'float64', 'int32', 'int64'], 'add_n') out = helper.create_variable_for_type_inference( -- GitLab