TensorDictBase.param_count#
- TensorDictBase.param_count(*, count_duplicates: bool = True) int#
Counts the number of parameters (total number of indexable items), accounting for tensors only.
- Keyword Arguments:
count_duplicates (bool) – Whether to count duplicated tensor as independent or not. If
False, only strictly identical tensors will be discarded (same views but different ids from a common base tensor will be counted twice). Defaults to True (each tensor is assumed to be a single copy).
Every tensordict class and every tensorclass has this method. For the other methods, see Methods by task.