From 88ac16b1e65d98e3d4d13f81e7cb27e47ac05147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CShashank?= Date: Wed, 16 Oct 2024 10:17:10 +0530 Subject: [PATCH] added type hints in lstm init --- neural_network/lstm.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/neural_network/lstm.py b/neural_network/lstm.py index 7e464ecc7..aee64fbb5 100644 --- a/neural_network/lstm.py +++ b/neural_network/lstm.py @@ -36,6 +36,28 @@ class LongShortTermMemory: >>> lstm.learning_rate 0.01 """ + self.input_data: str + self.hidden_layer_size: int + self.training_epochs: int + self.learning_rate: float + self.unique_chars: set[str] + self.data_length: int + self.vocabulary_size: int + self.char_to_index: dict[str, int] + self.index_to_char: dict[int, str] + self.input_sequence: str + self.target_sequence: str + self.random_generator: Generator + self.combined_inputs: dict[int, np.ndarray] + self.hidden_states: dict[int, np.ndarray] + self.cell_states: dict[int, np.ndarray] + self.forget_gate_activations: dict[int, np.ndarray] + self.input_gate_activations: dict[int, np.ndarray] + self.cell_state_candidates: dict[int, np.ndarray] + self.output_gate_activations: dict[int, np.ndarray] + self.network_outputs: dict[int, np.ndarray] + + self.input_data: str = input_data.lower() self.hidden_layer_size: int = hidden_layer_size self.training_epochs: int = training_epochs