Rate this Page
★ ★ ★ ★ ★

TensorDictBase.clear#

TensorDictBase.clear() → Self#

Removes every entry of the tensordict and returns self.

Raises:

RuntimeError – if the tensordict is locked.

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