Exemplo n.º 1
0
 def test_one_training_step(self):
     with self.test_session():
         model = OurModel(0)
         a = model.model.get_weights()
         trainer = Trainer(model.model,
                           filepath + "Train",
                           filepath + "Valid",
                           filepath + "Test",
                           identifier=0,
                           epochs=1,
                           save_model=False)
         trainer = trainer.train()
         b = trainer.get_weights()
         same = True
         while len(a) != 0:
             c = a.pop()
             d = b.pop()
             if (c != d).any():
                 same = False
         self.assertEqual(False, same)