chenyilun95 / tf-cpn

Cascaded Pyramid Network for Multi-Person Pose Estimation (CVPR 2018)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About saving model during training

FightForCS opened this issue · comments

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.

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.