tf.square(
x,
name=None
)
Computes square of x element-wise.
I.e., y = x*x = x^2.
Returns:
A Tensor or SparseTensor. Has the same type as x.
tf.math.squared_difference(
x,
y,
name=None
)
Returns (x - y)(x - y) element-wise.
Returns:
A Tensor. Has the same type as x.
tf.square()是對一個元素的操作
tf.squared_difference()是對兩個元素的操作。