How to do clips? Just clip the parameter, not clip the norm

As shown in the title, do clip like clip(p, 0, 1) making p in the range of (0,1).
I could not find a clip in the torch tensor functions

you want to use torch.clamp