Skip to content

Commit

Permalink
fix: weight init
Browse files Browse the repository at this point in the history
Signed-off-by: Avik Basu <ab93@users.noreply.github.com>
  • Loading branch information
ab93 committed Jun 12, 2024
1 parent b775e1c commit 09f2c01
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 82 deletions.
152 changes: 76 additions & 76 deletions examples/vanilla_ic.ipynb

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions numalogic/models/autoencoder/variants/icvanilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,6 @@ def __init__(
self.encoder.apply(self.init_weights)
self.decoder.apply(self.init_weights)

@staticmethod
def init_weights(m: nn.Module) -> None:
"""Initialize the parameters in the model."""
if isinstance(m, nn.Linear):
nn.init.xavier_normal_(m.weight)

def forward(self, batch: Tensor) -> tuple[Tensor, Tensor]:
batch = torch.swapdims(batch, 1, 2)
encoded = self.encoder(batch)
Expand Down

0 comments on commit 09f2c01

Please sign in to comment.