未验证 提交 2fe0758f 编写于 作者: W wangchaochaohu 提交者: GitHub

fix the doc of fill_constant test=develop (#23336)

上级 1d4d89ba
...@@ -559,7 +559,7 @@ def fill_constant(shape, dtype, value, force_cpu=False, out=None): ...@@ -559,7 +559,7 @@ def fill_constant(shape, dtype, value, force_cpu=False, out=None):
# attr shape is a list which doesn't contain Variable Tensor. # attr shape is a list which doesn't contain Variable Tensor.
data1 = fluid.layers.fill_constant(shape=[2,1], value=0, dtype='int64') # data1=[[0],[0]] data1 = fluid.layers.fill_constant(shape=[2,1], value=0, dtype='int64') # data1=[[0],[0]]
data2 = fluid.layers.fill_constant(shape=[2,1], value=5, dtype='int64', out=data1) data2 = fluid.layers.fill_constant(shape=[2,1], value=5, dtype='int64', out=data1)
# data1=[[0], [0]] data2=[[5], [5]] # data1=[[5], [5]] data2=[[5], [5]]
# attr shape is a list which contains Variable Tensor. # attr shape is a list which contains Variable Tensor.
positive_2 = fluid.layers.fill_constant([1], "int32", 2) positive_2 = fluid.layers.fill_constant([1], "int32", 2)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册