我在 a 的 TF 中有一個向量(表示一維張量)shape=(n,):my_vector = tf.random.uniform(shape=[n])我有一個張量 a shape=(m, n):my_tensor = tf.random.uniform(shape=[m, n])我想對my_tensorby的每一行進行點積,并從點積中my_vector獲得一個向量。shape=(m,)我怎樣才能做到這一點?我將它的元素想象得更清楚。
TensorFlow:如何對向量和張量進行點積?
慕田峪4524236
2024-01-04 16:22:05