Hi,
say x is a tensor with shape (M, N) while min and max have shape (M,).
I basically want to do:
for m in range(M):
    torch.clamp(x[m, :], min=min[m], max=max[m], out=x[m,:])

That would be applying clamp dimension-wise. Can I avoid the for loop ?
thanks