Skip to content

Commit 032a934

Browse files
committed
typo corrections
1 parent 0500d3d commit 032a934

File tree

1 file changed

+2
-2
lines changed
  • tutorials/02-intermediate/language_model

1 file changed

+2
-2
lines changed

tutorials/02-intermediate/language_model/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def detach(states):
8989
# Test the model
9090
with torch.no_grad():
9191
with open('sample.txt', 'w') as f:
92-
# Set intial hidden ane cell states
92+
# Set intial hidden and cell states
9393
state = (torch.zeros(num_layers, 1, hidden_size).to(device),
9494
torch.zeros(num_layers, 1, hidden_size).to(device))
9595

@@ -117,4 +117,4 @@ def detach(states):
117117
print('Sampled [{}/{}] words and save to {}'.format(i+1, num_samples, 'sample.txt'))
118118

119119
# Save the model checkpoints
120-
torch.save(model.state_dict(), 'model.ckpt')
120+
torch.save(model.state_dict(), 'model.ckpt')

0 commit comments

Comments
 (0)