提交 1536d293 编写于 作者: J jiweibo

data -> static.data

上级 5eda19e8
......@@ -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])
......
......@@ -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)
"""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册