Pytorch函数1 torch.max\ torch.min\ torch.squeeze\ torch.unsqueeze\ torch.rand \randn \randint
1.torch.max(input)输入input:任何形状的张量输出:返回输入张量input中所有元素的最大值。importtorcha=torch.randn((3,4,5))b=torch.max(a)#返回所有张量中的最大值print(a)tensor([[[-0.5234,-2.3275,1.8327,0.5354,1.1100],[0.7137,0.4375,-1.1837,0.816