Rate this Page
★ ★ ★ ★ ★

TensorDictBase.amin#

TensorDictBase.amin(dim: int | NO_DEFAULT = NO_DEFAULT, keepdim: bool = False, *, reduce: bool | None = None) → Self | Tensor#

Returns the minimum values of all elements in the input tensordict.

Same as min() with return_indices=False. A tuple dim reduces only its first dim. Starting with TensorDict 0.17, the default will change to reducing every dim of the tuple, as torch.amin() does.

Every tensordict class and every tensorclass has this method. For the other methods, see Methods by task.