Skip to content

Commit

Permalink
Initialize modules
Browse files Browse the repository at this point in the history
  • Loading branch information
bpiwowar committed Nov 29, 2023
1 parent 4ba979b commit de68d02
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/xpmir/learning/optim.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ def __init__(self):
Initializable.__init__(self)
torch.nn.Module.__init__(self)

def __initialize__(self, *args, **kwargs):
for module in self.modules:
module.initialize(*args, **kwargs)

def __call__(self, *args, **kwargs):
raise AssertionError("This module cannot be used as such: it is just a ")

Expand Down

0 comments on commit de68d02

Please sign in to comment.