Example #1
0
 def test_regenerate_wrong_shape(self):
     r = RBM(5, 10)
     data = [[1,1,1,1]]
     with self.assertRaises(ValueError):
         v,h = r.regenerate(data, 1)
Example #2
0
 def test_regenerate_negative_samples(self):
     r = RBM(5, 10)
     data = [[1,1,1,1,1]]
     with self.assertRaises(UnboundLocalError):
         v,h = r.regenerate(data, -1)
Example #3
0
 def test_regenerate(self):
     r = RBM(5, 10)
     data = [[1,1,1,1,1]]
     v,h = r.regenerate(data, 1)