From 2fe0758f67d1ae5de4d96d39403d24311782ac5a Mon Sep 17 00:00:00 2001 From: wangchaochaohu Date: Wed, 1 Apr 2020 14:43:21 +0800 Subject: [PATCH] fix the doc of fill_constant test=develop (#23336) --- python/paddle/fluid/layers/tensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/layers/tensor.py b/python/paddle/fluid/layers/tensor.py index 98ab713602c..19f479f6e99 100644 --- a/python/paddle/fluid/layers/tensor.py +++ b/python/paddle/fluid/layers/tensor.py @@ -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. 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) - # data1=[[0], [0]] data2=[[5], [5]] + # data1=[[5], [5]] data2=[[5], [5]] # attr shape is a list which contains Variable Tensor. positive_2 = fluid.layers.fill_constant([1], "int32", 2) -- GitLab