Replace the maximum value of tensor a with 0, leaving everything else unchanged. Return the result.
a
Input
tensor([1., 5., 3., 9., 2.])
Output
tensor([1., 5., 3., 0., 2.])
This one's part of Premium. Unlock the full PyTorch track plus every other premium problem on the site.
solve(...)