diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index fcf5dd0d4b33b..fefadb55ccfa0 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}