Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PyTorch torch.ge function

PyTorch torch.ge function


PyTorch torch reference manual 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

)

print

(

result

)


PyTorch torch reference manual PyTorch torch reference manual