Skip to content

Commit

Permalink
Fix whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkart committed Feb 17, 2025
1 parent 162c97f commit 5544b48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lambeq/training/pennylane_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class PennyLaneModel(Model, torch.nn.Module):
"""

weights: torch.nn.ParameterList # type: ignore[assignment]
weights: torch.nn.ParameterList # type: ignore[assignment]
symbols: list[Symbol]

def __init__(self,
Expand Down Expand Up @@ -131,7 +131,7 @@ def _reinitialise_modules(self) -> None:
"""Reinitialise all modules in the model."""
for module in self.modules():
try:
module.reset_parameters() # type: ignore[operator]
module.reset_parameters() # type: ignore[operator]
except (AttributeError, TypeError):
pass

Expand Down
4 changes: 2 additions & 2 deletions lambeq/training/pytorch_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
class PytorchModel(Model, torch.nn.Module):
"""A lambeq model for the classical pipeline using PyTorch."""

weights: torch.nn.ParameterList # type: ignore[assignment]
weights: torch.nn.ParameterList # type: ignore[assignment]
symbols: list[Symbol]

def __init__(self) -> None:
Expand All @@ -47,7 +47,7 @@ def _reinitialise_modules(self) -> None:
"""Reinitialise all modules in the model."""
for module in self.modules():
try:
module.reset_parameters() # type: ignore[operator]
module.reset_parameters() # type: ignore[operator]
except (AttributeError, TypeError):
pass

Expand Down

0 comments on commit 5544b48

Please sign in to comment.