is this a correct way to clamp a learnable parameter in a range of 0-1?
z = nn.Parameter(torch.clamp(torch.rand(1), 0, 1))

if I want to set a threshold as a learnable parameter, and clamp it in a range, is this correct way to do it?