News for hackers. Stuff that matters.
Re:TF-Coder, a tool that writes tricky TensorFlow expressions by im3w1l on Thursday August 27, 2020 @10:02AM (#24293794)
I recommend

X + Y[:, tf.newaxis]

For higher dimensions of Y, you can use (but it might be ill-advised)

X + Y[:, tf.newaxis, ...]

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.