diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index bbbc952ec81de5f140f64db7fff7054bf25be4a9..e1a7bddbfae439da5d79dffc66b942c679a25b7d 100755 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -13638,8 +13638,8 @@ def py_func(func, x, out, backward_func=None, skip_vars_in_backward_input=None): main_program = paddle.static.default_main_program() # Input of the forward function - x = paddle.data(name='x', shape=[2,3], dtype='int32') - y = paddle.data(name='y', shape=[2,3], dtype='int32') + x = paddle.static.data(name='x', shape=[2,3], dtype='int32') + y = paddle.static.data(name='y', shape=[2,3], dtype='int32') # Output of the forward function, name/dtype/shape must be specified output = create_tmp_var('output','int32', [3,1]) diff --git a/python/paddle/fluid/param_attr.py b/python/paddle/fluid/param_attr.py index f43fd73a4e22ccbcc1ac21d7b8f9d1edf944c360..17a09fb6c0c3b29856e1b12c5e37bbedfbacfac0 100644 --- a/python/paddle/fluid/param_attr.py +++ b/python/paddle/fluid/param_attr.py @@ -69,7 +69,7 @@ class ParamAttr(object): trainable=True) print(w_param_attrs.name) # "fc_weight" paddle.enable_static() - x = paddle.data(name='X', shape=[None, 1], dtype='float32') + x = paddle.static.data(name='X', shape=[None, 1], dtype='float32') y_predict = paddle.static.nn.fc(input=x, size=10, param_attr=w_param_attrs) """