TensorFlow函数:tf.negative
tf.negative
tf.negative函数计算给定数值的负值元素,y = -x
tf.negative函数定义如下
# pylint: disable=g-docstring-has-escape
@tf_export("math.negative", "negative")
def negative(x, name=None):
"""Computes numerical negative value element-wise.
I.e., \\(y = -x\\).
Args:
x: A `Tensor` or `SparseTensor`. Must be one of the following