Make Module.__init__ automatic

Summary: If a configurable class inherits torch.nn.Module and is instantiated, automatically call `torch.nn.Module.__init__` on it before doing anything else.

Reviewed By: shapovalov

Differential Revision: D42760349

fbshipit-source-id: 409894911a4252b7987e1fd218ee9ecefbec8e62
This commit is contained in:
Jeremy Reizenstein
2023-01-27 07:07:46 -08:00
committed by Facebook GitHub Bot
parent 97f8f9bf47
commit 9540c29023
29 changed files with 36 additions and 87 deletions

View File

@@ -38,9 +38,6 @@ class RayPointRefiner(Configurable, torch.nn.Module):
random_sampling: bool
add_input_samples: bool = True
def __post_init__(self) -> None:
super().__init__()
def forward(
self,
input_ray_bundle: ImplicitronRayBundle,