def update_meters(self, losses):
    loss_d = {k: at.scalar(v) for (k, v) in losses._asdict().items()}
    for (key, meter) in self.meters.items():
        meter.add(loss_d[key])
def update_meters(self, losses):
    loss_d = {k: at.scalar(v) for (k, v) in losses._asdict().items()}
    for (key, meter) in self.meters.items():
        meter.add(loss_d[key])