def print_log(step, interval, log, timer, time_sum):
    'Print log to logger.\n    '
    logging.info(('[GPU %d] step: %d, loss: %.5f, reg: %.4e, speed: %.2f steps/s, time: %.2f s' % (dist.get_rank(), step, (log['loss'] / interval), (log['reg'] / interval), (interval / time_sum), time_sum)))
    logging.info(('sample: %f, forward: %f, backward: %f, update: %f' % (timer['sample'], timer['forward'], timer['backward'], timer['update'])))
Print log to logger.
def print_log(step, interval, log, timer, time_sum):
    '\n    '
    logging.info(('[GPU %d] step: %d, loss: %.5f, reg: %.4e, speed: %.2f steps/s, time: %.2f s' % (dist.get_rank(), step, (log['loss'] / interval), (log['reg'] / interval), (interval / time_sum), time_sum)))
    logging.info(('sample: %f, forward: %f, backward: %f, update: %f' % (timer['sample'], timer['forward'], timer['backward'], timer['update'])))