def __call__(self, engine, logger, event_name):
    if (not isinstance(logger, TensorboardLogger)):
        raise RuntimeError("Handler 'OptimizerParamsHandler' works only with TensorboardLogger")
    global_step = self.global_step_transform(engine, event_name)
    tag_prefix = ('{}/'.format(self.tag) if self.tag else '')
    params = {'{}{}/group_{}'.format(tag_prefix, self.param_name, i): float(param_group[self.param_name]) for (i, param_group) in enumerate(self.optimizer.param_groups)}
    for (k, v) in params.items():
        logger.writer.add_scalar(k, v, global_step)
def __call__(self, engine, logger, event_name):
    if (not isinstance(logger, TensorboardLogger)):
        raise RuntimeError("Handler 'OptimizerParamsHandler' works only with TensorboardLogger")
    global_step = self.global_step_transform(engine, event_name)
    tag_prefix = ('{}/'.format(self.tag) if self.tag else )
    params = {'{}{}/group_{}'.format(tag_prefix, self.param_name, i): float(param_group[self.param_name]) for (i, param_group) in enumerate(self.optimizer.param_groups)}
    for (k, v) in params.items():
        logger.writer.add_scalar(k, v, global_step)