Rate this Page
★ ★ ★ ★ ★

TensorDictBase.get_item_shape#

TensorDictBase.get_item_shape(key: NestedKey)#

Returns the shape of the entry, without reading it with get() when possible.

Parameters:

key (NestedKey) – the key of the entry.

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