Confused about torch.max() and gradient

z,y = torch.max(x,1)

So that is the reason y doesn’t have a gradient function?