Commit c8af1c45 authored by Jeremy Reizenstein's avatar Jeremy Reizenstein Committed by Facebook GitHub Bot
Browse files

fix broken config for GenericModel

Summary: D42760349 (https://github.com/facebookresearch/pytorch3d/commit/9540c29023c2b6bb53e5a26a5e7a9d34ce88e9b1) (make Module.__init__ automatic) didn't account properly for inheritance.

Reviewed By: shapovalov

Differential Revision: D42834466

fbshipit-source-id: 53ee4c788985c1678ad905c06ccf12b2b41361e9
parent 7dfa6918
...@@ -944,7 +944,7 @@ def _fixup_class_init(some_class) -> None: ...@@ -944,7 +944,7 @@ def _fixup_class_init(some_class) -> None:
torch.nn.Module.__init__(self) torch.nn.Module.__init__(self)
getattr(self, _DATACLASS_INIT)(*args, **kwargs) getattr(self, _DATACLASS_INIT)(*args, **kwargs)
assert not hasattr(some_class, _DATACLASS_INIT) assert _DATACLASS_INIT not in some_class.__dict__
setattr(some_class, _DATACLASS_INIT, some_class.__init__) setattr(some_class, _DATACLASS_INIT, some_class.__init__)
some_class.__init__ = init some_class.__init__ = init
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment