PyTorch torch.ge function
PyTorch torch reference manual
torch.ge A function in PyTorch for element-wise greater-than-or-equal comparison.
Function definition
torch.ge(input, other, out)
Usage examples
Example
import
torch
Element-wise greater-than-or-equal comparison
x
=
torch.
tensor
(
[
1
,
2
,
3
,
4
]
)
y
=
torch.
tensor
(
[
2
,
2
,
2
,
5
]
)
result
=
torch.
ge
(
x
,
y
)
(
result
)