用法
__lt__(
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.less支持广播。更多关于广播这里
例子:
x = tf.constant([5, 4, 6])
y = tf.constant([5])
tf.math.less(x, y) ==> [False, True, False]
x = tf.constant([5, 4, 6])
y = tf.constant([5, 6, 7])
tf.math.less(x, y) ==> [False, True, True]
相关用法
- Python tf.Tensor.__le__用法及代码示例
- Python tf.Tensor.__rsub__用法及代码示例
- Python tf.Tensor.__abs__用法及代码示例
- Python tf.Tensor.__getitem__用法及代码示例
- Python tf.Tensor.__ge__用法及代码示例
- Python tf.Tensor.__rmatmul__用法及代码示例
- Python tf.Tensor.__bool__用法及代码示例
- Python tf.Tensor.__xor__用法及代码示例
- Python tf.Tensor.__sub__用法及代码示例
- Python tf.Tensor.__rpow__用法及代码示例
- Python tf.Tensor.__gt__用法及代码示例
- Python tf.Tensor.__pow__用法及代码示例
- Python tf.Tensor.__matmul__用法及代码示例
- Python tf.Tensor.set_shape用法及代码示例
- Python tf.Tensor.ref用法及代码示例
- Python tf.Tensor.get_shape用法及代码示例
- Python tf.TensorSpec.from_spec用法及代码示例
- Python tf.Tensor用法及代码示例
- Python tf.TensorSpec.from_tensor用法及代码示例
- Python tf.TensorShape.merge_with用法及代码示例
注:本文由纯净天空筛选整理自tensorflow.org大神的英文原创作品 tf.Tensor.__lt__。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
