import tensorflow as tf
a=tf.constant([[1,1.,3],[2,3,4]])
b=tf.constant([[1,1,1.],[2,2,2]])
c=tf.sqrt(tf.reduce_sum(tf.square(a-b),axis=1))
with tf.Session() as sess:
print(sess.run(a))
print(sess.run(b))
print(sess.run(c))
用tensorflow计算矩阵中行向量间的欧式距离
部署运行你感兴趣的模型镜像
您可能感兴趣的与本文相关的镜像
TensorFlow-v2.15
TensorFlow
TensorFlow 是由Google Brain 团队开发的开源机器学习框架,广泛应用于深度学习研究和生产环境。 它提供了一个灵活的平台,用于构建和训练各种机器学习模型





