detach#

pytorch_forecasting.utils._utils.detach(x: dict[str, Tensor | list[Tensor] | tuple[Tensor]] | Tensor | list[Tensor] | tuple[Tensor]) dict[str, Tensor | list[Tensor] | tuple[Tensor]] | Tensor | list[Tensor] | tuple[Tensor][source]#

Detach object

Parameters:

x – object to detach

Returns:

detached object