From e4bf7ae667a0384bb2791b7f782d0b9e43812423 Mon Sep 17 00:00:00 2001 From: superhao1995 <804673818@qq.com> Date: Thu, 8 Sep 2022 16:33:23 +0800 Subject: [PATCH] [NFC] polish colossalai/nn/lr_scheduler/torch.py code style (#1571) Co-authored-by: Research --- colossalai/nn/lr_scheduler/torch.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/colossalai/nn/lr_scheduler/torch.py b/colossalai/nn/lr_scheduler/torch.py index 6b57d18f2..05d2a49c1 100644 --- a/colossalai/nn/lr_scheduler/torch.py +++ b/colossalai/nn/lr_scheduler/torch.py @@ -58,8 +58,7 @@ class StepLR(_StepLR): """ def __init__(self, optimizer, total_steps, step_size: int = 1, gamma: float = 0.1, last_epoch: int = -1) -> None: - super().__init__(optimizer, step_size, - gamma=gamma, last_epoch=last_epoch) + super().__init__(optimizer, step_size, gamma=gamma, last_epoch=last_epoch) @LR_SCHEDULERS.register_module @@ -74,6 +73,5 @@ class ExponentialLR(_ExponentialLR): last_epoch (int, optional): The index of last epoch, defaults to -1. """ - def __init__(self, optimizer, total_steps, gamma: float = 1.0, - last_epoch: int = -1) -> None: + def __init__(self, optimizer, total_steps, gamma: float = 1.0, last_epoch: int = -1) -> None: super().__init__(optimizer, gamma, last_epoch=last_epoch)