Rate this Page
★ ★ ★ ★ ★

TensorDictBase.type#

TensorDictBase.type(dst_type: dtype) → Self#

Casts all tensors to dst_type.

Parameters:

dst_type (type or string) – the desired type

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