suriyadeepan / practical_seq2seq

A simple, minimal wrapper for tensorflow's seq2seq module, for experimenting with datasets rapidly
http://suriyadeepan.github.io/2016-12-31-practical-seq2seq/
GNU General Public License v3.0
569 stars 270 forks source link

Restore training clarification #2

Closed jonaslund closed 7 years ago

jonaslund commented 7 years ago

Hey

Great seq2seq examples!

To clarify, to continue training after an interruption.

sess = model.train(train_batch_gen, val_batch_gen)
# to continue training after interrupting,
#  run model.train with "sess=sess"

means to continue like this?

sess = model.restore_last_session()
sess.train(train_batch_gen, val_batch_gen)

thx!

suriyadeepan commented 7 years ago

thanks @jonaslund

# restore last saved session from checkpoint folder and return it
sess = model.restore_last_session() 
# pass session as an argument to train method
model.train(train_batch_gen, val_batch_gen, sess=sess) 
jonaslund commented 7 years ago

Just found it... but thanks for clarifying! 👍

Jatapiaro commented 7 years ago

It doesnt work, The count starts from the beggining, I just got the same file with some template text append at the end

Jatapiaro commented 7 years ago

@jonaslund Did that works for you? I mean if you're are in checkpoint 3000, and you stoped training and restart it, your next checkpoint is 4000? When I do that and obviously passing as argument the session, and restoring it, it starts from the beginning.