constants操作 import tensorflow as tf a = tf.constant([2, 2], name='a') b = tf.constant([[0, 1], [2, 3]], name='b') x = tf.multiply(a, b, name='mul') with tf.Session() as sess: print(sess.run(x)) # >> [[0 2] # [4 6]] # 普通的元素数乘 常见 返回值类型 参数 说明 算数运算符 .ad…