paddle.fluid.layers.scale bug
Created by: lgone2000
复现代码如下。虽然和qingqing沟通可以绕过,但还是希望这个要当作bug解决。
def testscale():
x = fluid.layers.data(name='x', shape=[1], dtype='float32')
y = x * 2
z = paddle.fluid.layers.scale(x, 2)
place = fluid.CPUPlace()
exe = fluid.Executor(place)
exe.run(fluid.default_startup_program())
inputdata = np.array([1],np.float32)
output = exe.run(
fluid.default_main_program(),
feed={'x': inputdata},
fetch_list=[x.name, y.name, z.name]
)
#should output 1,2,2 ; but it output 1,2,1
print output