From 873da75a416f887c95546a950d496bcbd4e823a0 Mon Sep 17 00:00:00 2001 From: Yang Zhang Date: Sat, 5 Sep 2020 18:01:16 +0800 Subject: [PATCH] Fix clip output var dtype (#27030) --- python/paddle/tensor/math.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/tensor/math.py b/python/paddle/tensor/math.py index 0b72c91c839..e4a751ab5b8 100755 --- a/python/paddle/tensor/math.py +++ b/python/paddle/tensor/math.py @@ -1608,7 +1608,7 @@ def clip(x, min=None, max=None, name=None): helper = LayerHelper('clip', **locals()) output = helper.create_variable_for_type_inference( - dtype=helper.input_dtype()) + dtype=helper.input_dtype('x')) helper.append_op( type='clip', inputs=inputs, outputs={'Out': [output]}, attrs=attrs) -- GitLab