Let’s experiment a bit…
Given a=torch.randn(5,5)
Then a.norm(p=np.inf) always returns 1.0
However torch.max(torch.abs(a)) correctly returns the abs value of the element with the maximum absolute value.
So either my understanding of the infinity norm is wrong, or torch.norm(p=np.inf) is doing something strange.
Moreover as noted in another thread torch.norm(p=np.inf) throws an error when applied to a Variable.