Premium problem20. Replace Max with 0

Medium Locked

Replace the maximum value of tensor a with 0, leaving everything else unchanged. Return the result.

Input

tensor([1., 5., 3., 9., 2.])

Output

tensor([1., 5., 3., 0., 2.])

Premium problem

This one's part of Premium. Unlock the full PyTorch track plus every other premium problem on the site.

Implement solve(...)