Exemple #1
0
 def test_batch_idx_with_none(self, init_optimizer):
     with pytest.warns(DeprecationWarning):
         scheduler = CyclicLR(init_optimizer)
     for p_group in init_optimizer.param_groups:
         assert p_group['initial_lr']
     scheduler.batch_step()
     assert scheduler.last_batch_idx == 1
Exemple #2
0
 def test_batch_idx_with_none(self, init_optimizer):
     scheduler = CyclicLR(init_optimizer)
     scheduler.batch_step()
     assert scheduler.last_batch_idx == 0
 def test_batch_idx_with_none(self, init_optimizer):
     scheduler = CyclicLR(init_optimizer)
     scheduler.batch_step()
     assert scheduler.last_batch_idx == 0