mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-04-12 08:45:53 +00:00
shorten the lines
This commit is contained in:
parent
39fd713543
commit
3c2da6e2f2
@ -345,14 +345,14 @@ class LSTM:
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# Define the input data and hyperparameters
|
# Define the input data and hyperparameters
|
||||||
data = "LSTM Neural Networks are designed to handle sequences of data."
|
# data = "LSTM Neural Networks are designed to handle sequences of data.This is just rantom test data"
|
||||||
hidden_dim = 50
|
# hidden_dim = 50
|
||||||
epochs = 1000
|
# epochs = 1000
|
||||||
lr = 0.01
|
# lr = 0.01
|
||||||
|
|
||||||
# Initialize and train the LSTM network
|
# # Initialize and train the LSTM network
|
||||||
lstm = LSTM(data, hidden_dim, epochs, lr)
|
# lstm = LSTM(data, hidden_dim, epochs, lr)
|
||||||
lstm.train()
|
# lstm.train()
|
||||||
|
|
||||||
# Test the LSTM network and compute accuracy
|
# # Test the LSTM network and compute accuracy
|
||||||
lstm.test()
|
# lstm.test()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user