import tensorflow as tf x=tf.constant([[1,2],[3,4]]) y=tf.constant([[1],[1]])#列向量 z=tf.constant([1,1])#行向量 u=x+y v=x+z print(u) print(v)
tensorflow中矩阵可以和矢量相加,
输出结果:
原文地址:https://www.cnblogs.com/sinceret/p/11723227.html
时间: 2024-10-10 15:07:51
import tensorflow as tf x=tf.constant([[1,2],[3,4]]) y=tf.constant([[1],[1]])#列向量 z=tf.constant([1,1])#行向量 u=x+y v=x+z print(u) print(v)
tensorflow中矩阵可以和矢量相加,
输出结果:
原文地址:https://www.cnblogs.com/sinceret/p/11723227.html