a = torch.rand(2,5,10)
I want to select at most 5% of values from tensor a randomly and then multiply those values with -1? How to do that? kindly, give a generic solution as the shape of the tensor is not fixed