def test_exp_schedule(backend_default):
 lr_init = 0.1
 decay = 0.01
 sch = ExpSchedule(decay)
 for epoch in range(10):
  lr = sch.get_learning_rate(learning_rate=lr_init, epoch=epoch)
  assert np.allclose(lr, (lr_init / (1.0 + (decay * epoch))))

def test_exp_schedule ( backend_default ) : lr_init = 0.1 decay = 0.01 sch = ExpSchedule ( decay ) for epoch in range ( 10 ) : lr = sch . get_learning_rate ( learning_rate = lr_init , epoch = epoch ) assert np . allclose ( lr , ( lr_init / ( 1.0 + ( decay * epoch ) ) ) )
test exponential learning rate schedule .