schedule fix
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user