TensorDictBase.__len__#
- TensorDictBase.__len__() int#
Returns the size of the first batch dimension, or 0 if the tensordict has no batch dimensions.
Every tensordict class and every tensorclass has this method. For the other methods, see Methods by task.