コード例 #1
0
ファイル: test_unn.py プロジェクト: Qwlouse/MontyLearning
 def test_forward_pass_single_samples(self):
     lc = LinearCombination(4, 1)
     for x, t in zip(self.X, self.T):
         t = np.atleast_2d(t)
         x = np.atleast_2d(x)
         out_buf = np.zeros_like(t)
         lc.forward_pass(self.theta, [x], out_buf)
         self.assertEqual(out_buf, t)
コード例 #2
0
ファイル: test_unn.py プロジェクト: nagyistoce/MontyLearning
 def test_forward_pass_single_samples(self):
     lc = LinearCombination(4, 1)
     for x, t in zip(self.X, self.T):
         t = np.atleast_2d(t)
         x = np.atleast_2d(x)
         out_buf = np.zeros_like(t)
         lc.forward_pass(self.theta, [x], out_buf)
         self.assertEqual(out_buf, t)
コード例 #3
0
ファイル: test_unn.py プロジェクト: Qwlouse/MontyLearning
 def test_forward_pass_multi_sample(self):
     lc = LinearCombination(4, 1)
     out_buf = np.zeros(self.T.shape, dtype=self.T.dtype)
     lc.forward_pass(self.theta, [self.X], out_buf)
     assert_allclose(out_buf, self.T)
コード例 #4
0
ファイル: test_unn.py プロジェクト: nagyistoce/MontyLearning
 def test_forward_pass_multi_sample(self):
     lc = LinearCombination(4, 1)
     out_buf = np.zeros(self.T.shape, dtype=self.T.dtype)
     lc.forward_pass(self.theta, [self.X], out_buf)
     assert_allclose(out_buf, self.T)