schedule fix

This commit is contained in:
lukovnikov
2019-04-03 17:10:08 +02:00
parent b64cc63a77
commit 91a073f804
2 changed files with 10 additions and 13 deletions

View File

@@ -51,9 +51,9 @@ class OptimizationTest(unittest.TestCase):
class WarmupCosineWithRestartsTest(unittest.TestCase):
def test_it(self):
m = WarmupCosineWithWarmupRestartsSchedule(warmup=0.05, t_total=1, cycles=5)
x = np.arange(0, 1000) / 1000
y = [m.get_lr_(xe) for xe in x]
m = WarmupCosineWithWarmupRestartsSchedule(warmup=-1, t_total=500, cycles=5)
x = np.arange(0, 1000)
y = [m.get_lr(xe) for xe in x]
plt.plot(y)
plt.show(block=False)
y = np.asarray(y)