Skip to content

Instantly share code, notes, and snippets.

@wcneill
Created July 30, 2020 03:40
Show Gist options
  • Save wcneill/9656bf1952b84580fdf206651c219cce to your computer and use it in GitHub Desktop.
Save wcneill/9656bf1952b84580fdf206651c219cce to your computer and use it in GitHub Desktop.
lstm
input_size = 50 # representing the one-hot encoded vector size
hidden_size = 100 # number of hidden nodes in the LSTM layer
n_layers = 2 # number of LSTM layers
output_size = 50 # output of 50 scores for the next character
lstm = nn.LSTM(input_size, n_hidden, n_layers, batch_first=True)
linear = nn.Linear(n_hidden, output_size)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment