def set_meters(): time_meter = TimeMeter(cfg.max_iter) loss_meter = AvgMeter('loss') loss_pre_meter = AvgMeter('loss_prem') loss_aux_meters = [AvgMeter('loss_aux{}'.format(i)) for i in range(cfg.num_aux_heads)] return time_meter, loss_meter, loss_pre_meter, loss_aux_meters
def set_meters(epoch): time_meter = TimeMeter(epoch) loss_meter = AvgMeter('loss') return time_meter, loss_meter