Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 88ac16b

Browse files
committedOct 16, 2024·
added type hints in lstm init
1 parent 750c9f6 commit 88ac16b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
 

‎neural_network/lstm.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,28 @@ def __init__(
3636
>>> lstm.learning_rate
3737
0.01
3838
"""
39+
self.input_data: str
40+
self.hidden_layer_size: int
41+
self.training_epochs: int
42+
self.learning_rate: float
43+
self.unique_chars: set[str]
44+
self.data_length: int
45+
self.vocabulary_size: int
46+
self.char_to_index: dict[str, int]
47+
self.index_to_char: dict[int, str]
48+
self.input_sequence: str
49+
self.target_sequence: str
50+
self.random_generator: Generator
51+
self.combined_inputs: dict[int, np.ndarray]
52+
self.hidden_states: dict[int, np.ndarray]
53+
self.cell_states: dict[int, np.ndarray]
54+
self.forget_gate_activations: dict[int, np.ndarray]
55+
self.input_gate_activations: dict[int, np.ndarray]
56+
self.cell_state_candidates: dict[int, np.ndarray]
57+
self.output_gate_activations: dict[int, np.ndarray]
58+
self.network_outputs: dict[int, np.ndarray]
59+
60+
3961
self.input_data: str = input_data.lower()
4062
self.hidden_layer_size: int = hidden_layer_size
4163
self.training_epochs: int = training_epochs

0 commit comments

Comments
 (0)
Please sign in to comment.