Skip to content

Instantly share code, notes, and snippets.

@MaximumEntropy
Created February 9, 2017 09:08
Show Gist options
  • Save MaximumEntropy/0ac6f9a953b4c3a5463e9a8f19895375 to your computer and use it in GitHub Desktop.
Save MaximumEntropy/0ac6f9a953b4c3a5463e9a8f19895375 to your computer and use it in GitHub Desktop.
lstm = nn.LSTM(512, 512, 3).cuda()
x_val = Variable(torch.randn(200, 128, 512)).cuda()
y_val = Variable(torch.randn(200, 128, 512)).cuda()
h0_val = Variable(torch.randn(3, 128, 512)).cuda()
c0_val = Variable(torch.randn(3, 128, 512)).cuda()
for i in xrange(1000):
output, (_, _) = lstm(x_val, (h0_val, c0_val))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment