用法
__gt__(
y, name=None
)參數
-
x一個Tensor。必須是以下類型之一:float32,float64,int32,uint8,int16,int8,int64,bfloat16,uint16,half,uint32,uint64。 -
y一個Tensor。必須與x具有相同的類型。 -
name操作的名稱(可選)。
返回
-
Tensor類型為bool。
返回 (x > y) 元素的真值。
注意: tf.math.greater支持廣播。更多關於廣播這裏
例子:
x = tf.constant([5, 4, 6])
y = tf.constant([5, 2, 5])
tf.math.greater(x, y) ==> [False, True, True]
x = tf.constant([5, 4, 6])
y = tf.constant([5])
tf.math.greater(x, y) ==> [False, False, True]
相關用法
- Python tf.Variable.__getitem__用法及代碼示例
- Python tf.Variable.__ge__用法及代碼示例
- Python tf.Variable.__lt__用法及代碼示例
- Python tf.Variable.__pow__用法及代碼示例
- Python tf.Variable.__le__用法及代碼示例
- Python tf.Variable.__matmul__用法及代碼示例
- Python tf.Variable.__rpow__用法及代碼示例
- Python tf.Variable.__abs__用法及代碼示例
- Python tf.Variable.__sub__用法及代碼示例
- Python tf.Variable.__rmatmul__用法及代碼示例
- Python tf.Variable.__rsub__用法及代碼示例
- Python tf.Variable.initialized_value用法及代碼示例
- Python tf.Variable.ref用法及代碼示例
- Python tf.Variable.load用法及代碼示例
- Python tf.Variable.scatter_nd_add用法及代碼示例
- Python tf.Variable.eval用法及代碼示例
- Python tf.Variable.scatter_nd_sub用法及代碼示例
- Python tf.Variable.scatter_nd_update用法及代碼示例
- Python tf.Variable用法及代碼示例
- Python tf.compat.v1.distributions.Multinomial.stddev用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.Variable.__gt__。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
