fix paddle.tensor.pow api example typo in api2.0

change the  exponet_tensor  to  exponent_tensor  in the pow api
revert-22778-infer_var_type
Steffy-zxf 5 years ago committed by GitHub
parent 8002b2beb4
commit cca5f8fa1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -178,9 +178,9 @@ def pow(input, exponent, out=None, name=None):
# y_1 is x^{2.0}
# example 2: argument exponent is Variable
exponet_tensor = fluid.layers.fill_constant([1], "float32", 3.0)
exponent_tensor = fluid.layers.fill_constant([1], "float32", 3.0)
res = fluid.data(name="output", shape=[32,32], dtype="float32")
y_2 = paddle.pow(x, exponet_tensor, out=res)
y_2 = paddle.pow(x, exponent_tensor, out=res)
# y_2 is x^{3.0}
"""
helper = LayerHelper('pow', **locals())

Loading…
Cancel
Save