diff --git a/lambeq/training/pennylane_model.py b/lambeq/training/pennylane_model.py index 00473a19..d76ca53a 100644 --- a/lambeq/training/pennylane_model.py +++ b/lambeq/training/pennylane_model.py @@ -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, @@ -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 diff --git a/lambeq/training/pytorch_model.py b/lambeq/training/pytorch_model.py index 3350bdb2..3e6093fb 100644 --- a/lambeq/training/pytorch_model.py +++ b/lambeq/training/pytorch_model.py @@ -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: @@ -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