clamp

dragon.vm.torch.clamp(
  input,
  min=None,
  max=None,
  out=None
)[source]

Compute the clipped input according to the given bounds.

\[\text{out} = \min(\max(\text{input}, low), high) \]
Parameters:
Returns:

dragon.vm.torch.Tensor The output tensor.