elementwise_mul ShapeError
Created by: gxpzy
环境 cpu paddle1.6 python3.7 代码 `import paddle.fluid as fluid import numpy as np
x = fluid.layers.data(name='x', shape=[1], dtype='float32') x_s = fluid.layers.shape(x)
y = fluid.layers.create_parameter(name='y', shape=[1], dtype='float32') y_s = fluid.layers.shape(y)
out_put = fluid.layers.elementwise_mul(y, x)`
错误信息
line 10, in <module> out_put = fluid.layers.elementwise_mul(y, x) Error: ShapeError: the dimension of input X must greater than or equal to the one of input Y. But received: the shape of input X = [1], the dimension of input X = 1, the shape of input Y = [-1, 1], the dimension of input Y = 2 [Hint: Expected x_dim.size() >= y_dim.size(), but received x_dim.size():1 < y_dim.size():2.] at (/paddle/paddle/fluid/operators/elementwise/elementwise_op.h:61) [operator < elementwise_mul > error]
x,y的shape都是[1],这里怎么说有一个是[-1,1]呢