multiply: element-wise,x,y维数必须相同,否则报错,Returns x * y element-wise.
matmul: Multiplies matrix a
by matrix b
, producing a
* b
. 个人理解和numpy库里的np.dot用法相同
tf库解释:
1.tf.multiply
tf.multiply(
x,
y,
name=None
)
Defined in tensorflow/python/ops/math_ops.py
.
See the guide: Math > Arithmetic Operators
Returns x * y element-wise.
NOTE: <a href="../tf/multiply"><code>tf.multiply</code></a>
supports broadcasting. More about broadcasting here
Args:
x
: ATensor
. Must be one of the following types:bfloat16
,half
,float32
,float64
,uint8
,int8
,uint16
,int16
,int32<