linux max函数用法,pytorch中torch.max和Tensor.view函数用法详解
torch.max()1.torch.max()简单来说是返回一个tensor中的最大值。例如:>>>si=torch.randn(4,5)>>>print(si)tensor([[1.1659,-1.5195,0.0455,1.7610,-0.2064],[-0.3443,2.0483,0.6303,0.9475,0.4364],[-1.5268,-1.0833,1.6847,0.0145,-0