Re:TF-Coder, a tool that writes tricky TensorFlow expressions
by mcabbott on Saturday August 29, 2020 @03:10AM
(#24314294)
Sure! The desire for fancier notation is from more complicated examples, the kind where you write elaborate comments to explain why you're permuting 3rd & 4th dim of B to line up with C and part of D.
X + Y[:, tf.newaxis]
For higher dimensions of Y, you can use (but it might be ill-advised)
X + Y[:, tf.newaxis, ...]