I have a 2D tensor having K*N dimension in TensorFlow,
For each row vector in the tensor, having N dimension, I can calculate the square of pairwise difference using the approach in How to construct square of pairwise difference from a vector in tensorflow?
However, I need to average the results of the K row vectors: performing each vector's square of pairwise difference and averaging the results.
How can I do? Need your help, many thanks!!!