diff --git a/tutorials/02-intermediate/language_model/main.py b/tutorials/02-intermediate/language_model/main.py index ef135bb7..a3b59c68 100644 --- a/tutorials/02-intermediate/language_model/main.py +++ b/tutorials/02-intermediate/language_model/main.py @@ -89,7 +89,7 @@ def detach(states): # Test the model with torch.no_grad(): with open('sample.txt', 'w') as f: - # Set intial hidden ane cell states + # Set intial hidden and cell states state = (torch.zeros(num_layers, 1, hidden_size).to(device), torch.zeros(num_layers, 1, hidden_size).to(device)) @@ -117,4 +117,4 @@ def detach(states): print('Sampled [{}/{}] words and save to {}'.format(i+1, num_samples, 'sample.txt')) # Save the model checkpoints -torch.save(model.state_dict(), 'model.ckpt') \ No newline at end of file +torch.save(model.state_dict(), 'model.ckpt')