torch.max和torch.softmax python max
目录
python max 错误用法
python max正确用法:
softmax 先exp,再在上面求总和的百分比
torch.softmax
可以筛选第3维最大,也可以筛选第2维最大的:
python max 错误用法
x1=6
x2=4
x1=min(x1,x2)
x2=max(x1,x2)print(x1,x2)
python max正确用法:
x1=6
x2=4
x1,x2=min(x1,x2),max(x1,x2)print(x1,x2)