TensorDictBase.load#
- classmethod TensorDictBase.load(prefix: str | Path, *args, **kwargs) Self#
Loads a tensordict that
save()ormemmap()wrote to disk.loadisload_memmap(): it takes the same arguments, includingallow_pickle,deviceandmode. The leaves of the result are memory-mapped tensors that read the files. See Save and load tensordicts and the example ofsave().- Parameters:
prefix (str or Path) – the directory, or the
".tdz"archive file, to read.
Every tensordict class and every tensorclass has this method. For the other methods, see Methods by task.