简单标量的点火指标

时间:2019-03-28 08:38:58

标签: pytorch pytorch-ignite

是否可以通过简单的标量将指标记录在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)?

0 个答案:

没有答案