chainer's document is very good, but I found every page in the document, I didn't found what is name rule of chainer report, How should I control the report name, and log it? For example, the follow code:
trainer.extend(chainer.training.extensions.PrintReport(
['iteration', 'epoch', 'elapsed_time', 'lr',
'main/loss',
'validation/main/all',
]), trigger=print_interval)
Notice that main/loss
and validation/main/all
, why is there a main before /loss, How should I control to report loss? Also notice the validation/main/all
.same question.
The prefix main
is the name of the optimizer (and its target link) used in the updater you are using; StandardUpdater
and other built-in updaters use the name main
as the default name of the optimizer. If you are using one of the built-in updaters as is, this is always main
unless you specify a special name. If you are using a customized updater that uses multiple optimizers, the custom updater assigns names to individual optimizers, which will be used as the prefix of items reported inside of the target link of the optimizer.
The prefix validation
is the name of Evaluator
extension. When you register an Evaluator
with trainer.extend()
, you can optionally pass name
argument to override this prefix. For example, if you want to use multiple Evaluator
objects each of which measures different things, you have to pass different names, which will be used as the prefix in the reported values.
As of the current version (v2.0.2), the naming rule of typical reported values are summarized in the document of chainer.report
.