TensorDictBase.clamp_min#
- TensorDictBase.clamp_min_(other: TensorDictBase | Tensor) Self#
Clamps every leaf to at least
otherin place and returnsself.The in-place version of
clamp_min(). It has nodefault: a tensordictothermust have every key of the tensordict, and its other keys are ignored.- Parameters:
other (TensorDictBase, Tensor or Number) – the lower bound, paired with the leaves as in
clamp_min(). A tensor is aligned with the batch dimensions of each leaf, except when a leaf is anUnbatchedTensoror inside atorch.functransform such astorch.vmap(): then every leaf broadcasts with it from the right, as in torch.
Every tensordict class and every tensorclass has this method. For the other methods, see Methods by task.