Rate this Page
★ ★ ★ ★ ★

TensorDictBase.detach#

TensorDictBase.detach() → Self#

Detach the tensors in the tensordict.

Returns:

a new tensordict with no tensor requiring gradient.

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

Tutorials that use detach#

Functional calls and ensembles with TensorDict

Functional calls and ensembles with TensorDict