예제 #1
0
 def test_optim_init(self):
     with pytest.raises(ValueError):
         Optimizer(0.1, None)
예제 #2
0
 def test_init(self):
     Optimizer(0.5, params)
     with pytest.raises(ValueError):
         Optimizer(-0.5, params)
예제 #3
0
 def test_construct(self):
     opt_2 = Optimizer(0.5, params)
     with pytest.raises(NotImplementedError):
         opt_2.construct()
예제 #4
0
 def test_optim_init(self):
     with pytest.raises(TypeError):
         Optimizer(0.1, (1, 2, 3))