PyTorch torch.min 関数


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

torch.minは PyTorch でテンソルの最小値を計算するための関数です。

関数定義

torch.min(input, dim, keepdim, out)

使用例

例

import torch

x = torch.tensor([[1, 2, 3], [4, 5, 6]])

print("グローバル最小:", torch.min(x))
print("dim=0 最小:", torch.min(x, dim=0))

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

その他の拡張