Hello,
I am wondering what is the most efficient way to implement per-row/column clamping? For instance,
input =  torch.tensor([[0,3,2,-1],[2,1,3,4]])
input_clamp = torch.Tensor([2,3])
output = per_row_clamp(input, input_clamp)
The output then should be [[0,2,2,-1],[2,1,3,3]]
One approach I can think of is to do a per-row division, then clamp everything to 1, then multiply the per-row clamp value back.
Thanks!