Skip to content

Commit

Permalink
[NPU] support fp16 of input for api pow (#31871)
Browse files Browse the repository at this point in the history
  • Loading branch information
liym27 authored Mar 25, 2021
1 parent f354e1d commit 4a823c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/paddle/fluid/layers/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 4a823c5

Please sign in to comment.