Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if iteration % 100 == 0:
- print('Epoch: {}/{}'.format(e, 200),
- 'Iteration: {}'.format(iteration),
- 'Loss: {}'.format(loss_value))
- if iteration % 1000 == 0:
- predict(device, net, flags.initial_words, n_vocab,
- vocab_to_int, int_to_vocab, top_k=5)
- torch.save(net.state_dict(),
- 'checkpoint_pt/model-{}.pth'.format(iteration))
Add Comment
Please, Sign In to add comment