models icon indicating copy to clipboard operation
models copied to clipboard

[Feature_request] Add training and test set loss in PTN for tensorboard visualization

Open mees opened this issue 9 years ago • 5 comments

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.

mees avatar Aug 08 '17 16:08 mees

@xcyan @arkanath

mees avatar Aug 08 '17 16:08 mees

@xcyan Will you be able to make a PR for this?

arkanath avatar Aug 18 '17 02:08 arkanath

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

xcyan avatar Aug 18 '17 10:08 xcyan

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!

mees avatar Aug 18 '17 11:08 mees

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.

tensorflowbutler avatar Jan 29 '20 23:01 tensorflowbutler