Rate this Page
★ ★ ★ ★ ★

TensorDictBase.densify#

TensorDictBase.densify(layout: layout = torch.strided)#

Attempts to represent the lazy stack with contiguous tensors (plain tensors or nested).

Keyword Arguments:

layout (layout) – the layout of the nested tensors, if any. Defaults to strided.

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

Tutorials that use densify#

Building tensordicts from streams

Building tensordicts from streams