From 3be87e0d91c3d9738eab89f9933e558aebbed22e Mon Sep 17 00:00:00 2001 From: dongshuilong Date: Tue, 25 Oct 2022 03:41:39 +0000 Subject: [PATCH] fix ConsinFixmatch bug --- ppcls/optimizer/learning_rate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ppcls/optimizer/learning_rate.py b/ppcls/optimizer/learning_rate.py index 8bbeb6ce..d08c801d 100644 --- a/ppcls/optimizer/learning_rate.py +++ b/ppcls/optimizer/learning_rate.py @@ -502,6 +502,7 @@ class CosineFixmatch(LRBase): self.num_warmup_steps = num_warmup_steps self.num_cycles = num_cycles self.last_epoch = last_epoch + self.by_epoch = by_epoch def __call__(self): def _lr_lambda(current_step): @@ -517,4 +518,4 @@ class CosineFixmatch(LRBase): lr_lambda=_lr_lambda, last_epoch=self.last_epoch) setattr(learning_rate, "by_epoch", self.by_epoch) - return learning_rate \ No newline at end of file + return learning_rate -- GitLab