Rate this Page
★ ★ ★ ★ ★

TensorDictBase.popitem#

TensorDictBase.popitem() → Tuple[NestedKey, Tensor | TensorCollection]#

Removes the item that was last inserted into the TensorDict.

popitem will only return non-nested values.

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