diff --git a/doc/paddle/api/paddle/fluid/layers/nn/py_func_cn.rst b/doc/paddle/api/paddle/fluid/layers/nn/py_func_cn.rst index b2c06f8c3f8ab5fcfa295cb96e8fcc7a62499b8a..3c5f6fe3e95a66a5e1113eabb7b722c294e87988 100644 --- a/doc/paddle/api/paddle/fluid/layers/nn/py_func_cn.rst +++ b/doc/paddle/api/paddle/fluid/layers/nn/py_func_cn.rst @@ -107,8 +107,8 @@ PaddlePaddle 通过py_func在Python端注册OP。py_func的设计原理在于Pad main_program = paddle.static.default_main_program() # 创建前向函数的输入变量 - 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') # 创建前向函数的输出变量,必须指明变量名称name/数据类型dtype/维度shape output = create_tmp_var('output','int32', [3,1]) diff --git a/doc/paddle/api/paddle/fluid/param_attr/ParamAttr_cn.rst b/doc/paddle/api/paddle/fluid/param_attr/ParamAttr_cn.rst index 212901778666f0368c5811af76d83f2b10a816cf..b3947784aeb846ed9213755a78d5b23e67e7f33b 100644 --- a/doc/paddle/api/paddle/fluid/param_attr/ParamAttr_cn.rst +++ b/doc/paddle/api/paddle/fluid/param_attr/ParamAttr_cn.rst @@ -42,7 +42,7 @@ ParamAttr trainable=True) print(w_param_attrs.name) # "fc_weight" paddle.enable_static() - x = paddle.data(name='X', shape=[1], dtype='float32') + x = paddle.static.data(name='X', shape=[1], dtype='float32') y_predict = paddle.static.nn.fc(input=x, size=10, param_attr=w_param_attrs)