From 902461333715d16773cac1e5e1300be705f49205 Mon Sep 17 00:00:00 2001 From: lukovnikov Date: Tue, 12 Mar 2019 13:23:58 +0100 Subject: [PATCH] changing docker --- pytorch_pretrained_bert/optimization.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytorch_pretrained_bert/optimization.py b/pytorch_pretrained_bert/optimization.py index 58e16f01a6..481072c483 100644 --- a/pytorch_pretrained_bert/optimization.py +++ b/pytorch_pretrained_bert/optimization.py @@ -69,7 +69,7 @@ class WarmupCosineSchedule(LRSchedule): return progress / self.warmup else: 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): @@ -84,7 +84,7 @@ class WarmupCosineWithRestartsSchedule(WarmupCosineSchedule): return progress / self.warmup else: 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