私は2つのテンソルがありますテンソルを1つクローン化して3次元テンソルを連結しますか?
a = tf.placeholder(tf.float32, [None, 20, 100])
b = tf.placeholder(tf.float32, [None, 1, 100])
私はa[i, 20, 100]
にb
を追加したい、などc
としてc
を作成するには、[None, 20, 200]
の形状を有しています。
これはかなり単純そうですが、私はtf.concat
でこれを行う方法を考え出したていない:
tf.concat(0, [a, b]) -> Shapes (20, 100) and (1, 100) are not compatible
tf.concat(1, [a, b]) => shape=(?, 28, 100) which is not what I wanted
tf.concat(2, [a, b]) -> Shapes (?, 20) and (?, 1) are not compatible
私はCONCAT、その後a
とb
最初の形状を変更する必要がありますか?
あなたはtf.concat' – martianwars