Closed FightForCS closed 6 years ago
This question concerns the tensorflow implementation of training strategy . One simple method is to compute the validation loss after each epoch. Note that it should not compute gradient back (i.e. remove train_op from sess.run). You need to modify the file lib/tfflat/base.py to change training schedule. Note that you should feed validation data. But I think the implementation can be complex and you might need to re-design the code structure.
The original code save model after every one ecpoh. What if I want to save model only when validation loss is smaller? How can I add evaluation code during training? Thanks.