提交 967e3d8c authored 作者: Cesar Laurent's avatar Cesar Laurent

Fixed test.

上级 cc2d57bf
...@@ -5536,10 +5536,10 @@ class TestGradUntil(unittest.TestCase): ...@@ -5536,10 +5536,10 @@ class TestGradUntil(unittest.TestCase):
def setUp(self): def setUp(self):
self.x = tensor.vector(name='x') self.x = tensor.vector(name='x')
self.until = tensor.scalar(name='until', dtype='int64') self.until = tensor.scalar(name='until', dtype='int64')
self.seq = numpy.arange(15, dtype=theano.config.floatX) self.seq = np.arange(15, dtype=theano.config.floatX)
self.numpy_output = self.seq[:7]**2 self.numpy_output = self.seq[:7]**2
z = numpy.zeros(8, dtype=theano.config.floatX) z = np.zeros(8, dtype=theano.config.floatX)
self.numpy_gradient = 2 * numpy.concatenate([self.seq[:7], z], axis=0) self.numpy_gradient = 2 * np.concatenate([self.seq[:7], z], axis=0)
def test_grad_until(self): def test_grad_until(self):
r, _ = theano.scan(lambda x, u: (x * x, r, _ = theano.scan(lambda x, u: (x * x,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论