diff --git a/tensordict/nn/params.py b/tensordict/nn/params.py index eb6ccb810..62917f5a8 100644 --- a/tensordict/nn/params.py +++ b/tensordict/nn/params.py @@ -424,7 +424,7 @@ def apply( ... @_unlock_and_set(inplace=True) - def _apply(*args, **kwargs): + def _apply_nest(*args, **kwargs): ... @_get_post_hook diff --git a/tensordict/tensordict.py b/tensordict/tensordict.py index c65f85ff7..de444bf16 100644 --- a/tensordict/tensordict.py +++ b/tensordict/tensordict.py @@ -5231,7 +5231,9 @@ def _empty_like(td: T, *args, **kwargs) -> T: "cloned, preventing empty_like to be called. " "Consider calling tensordict.to_tensordict() first." ) from err - return tdclone._fast_apply(lambda x: torch.empty_like(x, *args, **kwargs), inplace=True) + return tdclone._fast_apply( + lambda x: torch.empty_like(x, *args, **kwargs), inplace=True + ) @implements_for_td(torch.clone)