Python 在TensorFlow中关联(如numpy.correlate)

Python 在TensorFlow中关联(如numpy.correlate),python,numpy,tensorflow,Python,Numpy,Tensorflow,TensorFlow中是否有关联函数(如numpy.CORRELATE)?比如说, numpy.correlate(x,y) 我建议你,博士。但我不使用这个框架 我使用pip安装——升级tensorflow probability安装了它 import tensorflow as tf import tensorflow_probability as tfp x = tf.random_uniform((5,2),2,3) y = tf.random_uniform((5,2),2,3)

TensorFlow中是否有关联函数(如
numpy.CORRELATE
)?比如说,

numpy.correlate(x,y)
我建议你,博士。但我不使用这个框架

我使用
pip安装——升级tensorflow probability
安装了它

import tensorflow as tf
import tensorflow_probability as tfp


x = tf.random_uniform((5,2),2,3)
y = tf.random_uniform((5,2),2,3)


corr = tfp.stats.correlation(x, y)

with tf.Session() as sess :
    print(sess.run( corr))
[[0.32789752-0.12169117]

[0.83670807-0.09973542]]

我建议你,博士。但我不使用这个框架

我使用
pip安装——升级tensorflow probability
安装了它

import tensorflow as tf
import tensorflow_probability as tfp


x = tf.random_uniform((5,2),2,3)
y = tf.random_uniform((5,2),2,3)


corr = tfp.stats.correlation(x, y)

with tf.Session() as sess :
    print(sess.run( corr))
[[0.32789752-0.12169117]

[0.83670807-0.09973542]]