import torch
a = torch.tensor((1, 2, -1))
b = torch.tensor((3, 0, 4))
torch.maximum(a, b)
结果应该是:
tensor([3, 2, 4])
AttributeError: module 'torch' has no attribute 'maximum'
torch版本:1.6.0+cu101
发现max和maximum结果一样:
print(torch.__version__)
a = torch.tensor((1, 2, -1))
b = torch.tensor((3, 0, 4))
print(torch.max(a, b))