Pairwise sum in tensorflow

Viewed 628

I have two tensors A and B, both of shape [10 5]. How do I compute a tensor C of shape [10 5 5] such that C[x, i, j] = A[x, i] + B[x, j]?

Edit: this is the sum analog of outer-product, not the outer product itself.

3 Answers
Related