def set_lr(self, lr):
if isinstance(lr, list):<EOL><INDENT>for group_lr, param_group in zip(lr, self.optimizer.param_groups):<EOL><INDENT>param_group['<STR_LIT>'] = group_lr<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for param_group in self.optimizer.param_groups:<EOL><INDENT>param_group['<STR_LIT>'] = lr<EOL><DEDENT><DEDENT>
Set a learning rate for the optimizer