[PYTORCH] torch.max 함수 설명
torch.max torch.max(input) -> Tensor torch.max(input, dim, keepdim=False, *, out=None) -> tuple (max, max_indices) torch.max 함수는 텐서에서 최대값을 구하는 함수이다. import torch import torch.nn as nn data = torch.randn((5, 5)) print(data) print(torch.max(data)) #### # tensor([[ 1.1328, -0.0392, -0.7076, 0.5610, 0.8010], # [-0.0898, -1.4467, -0.7285, -0.1195, -2.1070], # [ 0.4547, 1.7739, 0.1664, -1.0242, 0.0474..