def test_forward_pass_single_samples(self): lc = Sigmoid(1, 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(np.array([]), [x], out_buf) assert_allclose(out_buf, t)
def test_forward_pass_multi_sample(self): lc = Sigmoid(1, 1) out_buf = np.zeros(self.T.shape, dtype=self.T.dtype) lc.forward_pass(np.array([]), [self.X], out_buf) assert_allclose(out_buf, self.T)