[Feature_request] Add training and test set loss in PTN for tensorboard visualization
The perspective transformer net shows only the validation error in tensorboard during training, it would be very helpful to also show the training and the test set loss during training.
@xcyan @arkanath
@xcyan Will you be able to make a PR for this?
I double checked: we visualized the training error rather than the validation error. https://github.com/tensorflow/models/blob/master/ptn/model_rotator.py#L166
Evaluating validation and testing loss every epoch will slow down the training a lot. @mees You might want to run 3 separate jobs (eval_ptn.py) in parallel with different flags (set flags.eval_set = 'train', 'val', or 'test'). https://github.com/tensorflow/models/blob/master/ptn/eval_ptn.py#L59
Our evaluation code will automatically detect the latest checkpoint and compute the metrics (so make sure you run the evaluation together with training script). If you want to add more evaluation metrics, please follow the instructions: (1) add your own metrics https://github.com/tensorflow/models/blob/master/ptn/metrics.py#L86 (2) link the newly added metric to the tensor graph https://github.com/tensorflow/models/blob/master/ptn/model_ptn.py#L101
You are right @xcyan, the validation is only loaded only for the visualization part, and sure you don't want to compute the validation and test loss every step, but it's nice to have it every x steps. I will check your solution, thanks!
Hi There, We are checking to see if you still need help on this, as this seems to be considerably old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing. If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.