-
Notifications
You must be signed in to change notification settings - Fork 213
Closed
Labels
help wantedExtra attention is neededExtra attention is needed
Description
I'm interested to understand why it is necessary to overwrite the default nn.Module
of torch in patch.py
:
Line 125 in eeee191
nn.Module = PatchedModule |
This seems to be a quite invasive thing since it alters the behavior of any torch.nn
module after torchdrug
has been imported.
For example, your implementation of register_buffer
in patch.py
lacks the keyword argument persistent
which is present in native torch: https://github.com/pytorch/pytorch/blob/989b24855efe0a8287954040c89d679625dcabe1/torch/nn/modules/module.py#L277
I would greatly appreciate if you could please let me know how I can fall back to the native torch behavior after having imported torchdrug somewhere above in my code.
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed