Hi, I am trying to show the progress bar for both the training and validation process, but the examples only demonstrate how to use pbar for the trainer.
If I directly attach both the trainer and the evaluator to the pbar, then the total number of iterations in the validation process becomes incorrect (still the number of training iteration).
So I am wondering how to use it for both trainer and evaluator? Thanks!
@wangyirui please take a look at this example. We setup 3 progress bars: for trainer, for
train_evaluator (validation on train subset) and evaluator (validation on test dataset):
https://github.com/pytorch/ignite/blob/5b1bcd3df3e16812a1c15543973ed8c520d97420/examples/references/classification/imagenet/code/scripts/common_training.py#L79-L87
Options: with_pbars=True, with_pbar_on_iters=True.
For evaluators:
https://github.com/pytorch/ignite/blob/5b1bcd3df3e16812a1c15543973ed8c520d97420/examples/references/classification/imagenet/code/scripts/common_training.py#L109-L114
HTH
@wangyirui please take a look at this example. We setup 3 progress bars: for
trainer, for
train_evaluator(validation on train subset) andevaluator(validation on test dataset):Options:
with_pbars=True, with_pbar_on_iters=True.
For evaluators:
https://github.com/pytorch/ignite/blob/5b1bcd3df3e16812a1c15543973ed8c520d97420/examples/references/classification/imagenet/code/scripts/common_training.py#L109-L114HTH
Thanks for your quick reply!!!! I will go through these examples.
@wangyirui can we close the issue as answered ?
@vfdev-5 Sure. It works good now. Thanks!