From 4a823c5f633e2dd20d5fd26c666c3689bcff568e Mon Sep 17 00:00:00 2001 From: liym27 <33742067+liym27@users.noreply.github.com> Date: Thu, 25 Mar 2021 19:53:52 +0800 Subject: [PATCH] [NPU] support fp16 of input for api pow (#31871) --- python/paddle/fluid/layers/nn.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index fcf5dd0d4b3..fefadb55ccf 100755 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -9525,8 +9525,8 @@ def pow(x, factor=1.0, name=None): y_2 = fluid.layers.pow(x, factor=factor_tensor) # y_2 is x^{3.0} """ - check_variable_and_dtype(x, 'x', ['int32', 'int64', 'float32', 'float64'], - 'pow') + check_variable_and_dtype( + x, 'x', ['int32', 'int64', 'float16', 'float32', 'float64'], 'pow') helper = LayerHelper('pow', **locals()) inputs = {'X': x} -- GitLab