I am trying to correlate two matrices column wise. i.e. correlate the 1st column of the 1st matrix with the 1st column of the 2nd matrix and so on. In numpy I do:
np.corrcoef(x, y, axis=0)
And it works great. What would be the Tensorflow equivalent of that command?
I tried using streaming_pearson_correlation1 but that correlates all the columns together instead of providing a result per column.
As a last resort I'm considering splitting the tensor into separate column tensors, but I'm guessing this will have a performance cost.
I know that I can wrap numpy in a py_func, but then it won't run on a GPU.
Thanks in advance for the help.