Commit 90246133 authored by lukovnikov's avatar lukovnikov
Browse files

changing docker

parent baf66d14
...@@ -69,7 +69,7 @@ class WarmupCosineSchedule(LRSchedule): ...@@ -69,7 +69,7 @@ class WarmupCosineSchedule(LRSchedule):
return progress / self.warmup return progress / self.warmup
else: else:
progress = (progress - self.warmup) / (1 - self.warmup) # progress after warmup progress = (progress - self.warmup) / (1 - self.warmup) # progress after warmup
return 0.5 * (1. + math.cos(math.pi * ((self.cycles * 2 * progress) % 1)) return 0.5 * (1. + math.cos(math.pi * self.cycles * 2 * progress))
class WarmupCosineWithRestartsSchedule(WarmupCosineSchedule): class WarmupCosineWithRestartsSchedule(WarmupCosineSchedule):
...@@ -84,7 +84,7 @@ class WarmupCosineWithRestartsSchedule(WarmupCosineSchedule): ...@@ -84,7 +84,7 @@ class WarmupCosineWithRestartsSchedule(WarmupCosineSchedule):
return progress / self.warmup return progress / self.warmup
else: else:
progress = (progress - self.warmup) / (1 - self.warmup) # progress after warmup progress = (progress - self.warmup) / (1 - self.warmup) # progress after warmup
ret = 0.5 * (1. + math.cos(math.pi * self.cycles * 2 * progress)) ret = 0.5 * (1. + math.cos(math.pi * ((self.cycles * 2 * progress) % 1)))
return ret return ret
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment