Guest User

Untitled

a guest
Feb 15th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. if iteration % 100 == 0:
  2. print('Epoch: {}/{}'.format(e, 200),
  3. 'Iteration: {}'.format(iteration),
  4. 'Loss: {}'.format(loss_value))
  5.  
  6. if iteration % 1000 == 0:
  7. predict(device, net, flags.initial_words, n_vocab,
  8. vocab_to_int, int_to_vocab, top_k=5)
  9. torch.save(net.state_dict(),
  10. 'checkpoint_pt/model-{}.pth'.format(iteration))
Add Comment
Please, Sign In to add comment