tf.math.squared_difference详解

官网链接
https://tensorflow.google.cn/api_docs/python/tf/math/squared_difference

tf.math.squared_difference(
    x,
    y,
    name=None
)

例子

import tensorflow as tf

a=tf.constant([0, 2, 3, 1,1])
b=tf.constant([0,1,2,3,4])
c=tf.math.squared_difference(a,b)

with tf.Session() as sess:
    print(sess.run(c))
[0 1 1 4 9]

猜你喜欢

转载自blog.csdn.net/lllxxq141592654/article/details/85415043