Example #1
0
 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)
Example #2
0
 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)
Example #3
0
 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)
Example #4
0
 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)