Rate this Page
★ ★ ★ ★ ★

TensorDictBase.from_consolidated#

classmethod TensorDictBase.from_consolidated(filename)#

Reconstructs a tensordict from a file written by consolidate().

The batch sizes and names are as they were when the file was written. To write later changes into the file, call consolidate(filename=filename) again on the consolidated tensordict. See from_consolidated().

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

Tutorials that use from_consolidated#

Benchmarking TensorDict serialization speed

Benchmarking TensorDict serialization speed