PyTorch torch.ge 関数
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)
# 要素ごとの以上(>=)比較
x = torch.tensor([1, 2, 3, 4])
y = torch.tensor([2, 2, 2, 5])
result = torch.ge(x, y)
print(result)
その他の拡張
Pytorch torch リファレンスマニュアル