Rate this Page
★ ★ ★ ★ ★

TensorDictBase.shape#

property TensorDictBase.shape: Size#

the same as batch_size.

Assigning it sets the batch size.

Type:

The batch size of the tensordict, as a torch.Size

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