Skip to content

Commit

Permalink
[BugFix] Torch 1.13 compat (#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens authored Jun 14, 2023
1 parent 61cc530 commit 4d679e4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tensordict/nn/functional_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@

from tensordict.utils import implement_for
from torch import nn
from torch.nn.modules.module import _global_parameter_registration_hooks

try:
from torch.nn.modules.module import _global_parameter_registration_hooks
except ModuleNotFoundError:
# old torch version, passing
pass


@implement_for("torch", "2.0", None)
Expand Down

0 comments on commit 4d679e4

Please sign in to comment.