I have two tensors, get_shape = [?, 400] and [?, 1176]. I want to concat them into one tensor of size [?, 1576].
I tried concat, but it requires both to be the same dimension.
How to do so?
Hopefully, you are passing same dimension of input via batch size.
import tensorflow as tf
import numpy as np
t1 = tf.placeholder(tf.float32, [None, 400])
t2 = tf.placeholder(tf.float32, [None, 1176])
t3 = tf.concat([t1, t2], axis = 1)
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
t3_val = sess.run(t3, feed_dict = {t1: np.ones((300, 400)), t2: np.ones((300, 1176))})
print(t3_val.shape)
# (300, 1576)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With