Skip to content

Instantly share code, notes, and snippets.

@wcneill
Last active July 30, 2020 03:38
Show Gist options
  • Save wcneill/aa96a7026d8c178d2a7b12af3b2a2425 to your computer and use it in GitHub Desktop.
Save wcneill/aa96a7026d8c178d2a7b12af3b2a2425 to your computer and use it in GitHub Desktop.
for medium article on LSTMs
input_size = 1 # The number of variables in your sequence data.
n_hidden = 100 # The number of hidden nodes in the LSTM layer.
n_layers = 2 # The total number of LSTM models layers
out_size = 1 # The size of the output you desire from your RNN
lstm = nn.LSTM(input_size, n_hidden, n_layers)
linear = nn.Linear(n_hidden, 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment