提交 b9a03464 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

test for the new version of the hash function introduced.

上级 8724e6e3
......@@ -1999,6 +1999,16 @@ class T_Scan(unittest.TestCase):
conv = theano.tensor.signal.conv.conv2d(m1, m2)
def test_hash(self):
x = theano.tensor.vector()
y = theano.tensor.vector()
scan1,updates = theano.scan(lambda _x:_x+1, x )
scan2,updates = theano.scan(lambda _x:_x+1, y )
assert scan1.owner.op == scan2.owner.op
assert hash(scan1.owner.op) == hash(scan2.owner.op)
if __name__ == '__main__':
#'''
print ' Use nosetests to run these tests '
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论