I ran a simple code on my macOS with torch version = 1.6.0 and python version = 3.7.4:
import torch
x = torch.tensor([[1],[2],[3],[5]],dtype = torch.float)
y = torch.tensor([[1],[2],[3],[4]],dtype = torch.float)
print(torch.maximum(x,y))
But I got AttributeError: module ‘torch’ has no attribute ‘maximum’.
Torch does have maximum function which returns the elementwise maximum of two tensors. Where did I get wrong? I’ve been stuck on this for quite a while. Thanks.