We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0500d3d commit 032a934Copy full SHA for 032a934
tutorials/02-intermediate/language_model/main.py
@@ -89,7 +89,7 @@ def detach(states):
89
# Test the model
90
with torch.no_grad():
91
with open('sample.txt', 'w') as f:
92
- # Set intial hidden ane cell states
+ # Set intial hidden and cell states
93
state = (torch.zeros(num_layers, 1, hidden_size).to(device),
94
torch.zeros(num_layers, 1, hidden_size).to(device))
95
@@ -117,4 +117,4 @@ def detach(states):
117
print('Sampled [{}/{}] words and save to {}'.format(i+1, num_samples, 'sample.txt'))
118
119
# Save the model checkpoints
120
-torch.save(model.state_dict(), 'model.ckpt')
+torch.save(model.state_dict(), 'model.ckpt')
0 commit comments