Don’t hate me. In Tensorflow, the following code works:

a = tf.placeholder(tf.float32, [10,49,1024])
b = tf.placeholder(tf.float32, [10,1024])
b + tf.expand_dims(a, 1)

I’ll replace my code using the following:

c = a + b.unsqueeze(1).repeat(1,a.size(1),1)

Correct?