diff --git a/lambeq/training/pennylane_model.py b/lambeq/training/pennylane_model.py index 31d8dc59..00473a19 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 + 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() + 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 d3841cc8..3350bdb2 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 + 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() + module.reset_parameters() # type: ignore[operator] except (AttributeError, TypeError): pass