行列とベクトル和でtensorflow

インポートAS tensorflowのTF 

X = tf.constant([1,2]、[3,4 ])
Y = tf.constant([1]、[1]) 列ベクトル 
Z = tf.constant([ 1,1])行ベクトル

U = X + Y 
V = X + Zの

印刷(U)
 プリント(V)

行列は、ベクトル加算をtensorflowできます

 

 出力:

 

 

おすすめ

転載: www.cnblogs.com/sinceret/p/11723227.html