是否可以通过简单的标量将指标记录在ignite
中?为此,我目前正在这样做:
some_metric = some_computation # some scalar
# transform to metric with a RunningAverage with a decay of 1.
ignite.metrics.RunningAverage(output_transform=lambda x: some_metric,
alpha=1.).attach(train_engine, 'some_metric')
pbar = ignite.contrib.handlers.ProgressBar(persist=True)
pbar.attach(train_engine, ['some_metric'])
是否有一些更优雅的方法(例如,不滥用RunninAverage
)?