PyTorch torch.ge 関数


Pytorch torch 参考手册Pytorch torch リファレンスマニュアル

torch.gePyTorch で要素ごとに以上(>=)を比較する関数です。

関数定義

torch.ge(input, other, out)

使用例

実例

import torch

# 要素ごとの以上(>=)比較
x = torch.tensor([1, 2, 3, 4])
y = torch.tensor([2, 2, 2, 5])

result = torch.ge(x, y)
print(result)

Pytorch torch 参考手册Pytorch torch リファレンスマニュアル

その他の拡張