提交 6013ef12 authored 作者: Frederic Bastien's avatar Frederic Bastien

fix a new test in FAST_COMPILE.

上级 ee52a32a
...@@ -20,10 +20,12 @@ def test_local_csm_properties_csm(): ...@@ -20,10 +20,12 @@ def test_local_csm_properties_csm():
data = tensor.vector() data = tensor.vector()
indices, indptr, shape = (tensor.ivector(), tensor.ivector(), indices, indptr, shape = (tensor.ivector(), tensor.ivector(),
tensor.ivector()) tensor.ivector())
mode = theano.compile.mode.get_default_mode()
mode = mode.including("specialize", "local_csm_properties_csm")
for CS, cast in [(CSC, sp.csc_matrix), (CSR, sp.csr_matrix)]: for CS, cast in [(CSC, sp.csc_matrix), (CSR, sp.csr_matrix)]:
f = theano.function([data, indices, indptr, shape], f = theano.function([data, indices, indptr, shape],
csm_properties(CS(data, indices, indptr, shape))) csm_properties(CS(data, indices, indptr, shape)),
mode=mode)
#theano.printing.debugprint(f) #theano.printing.debugprint(f)
assert not any(isinstance(node.op, (CSM, CSMProperties)) for node assert not any(isinstance(node.op, (CSM, CSMProperties)) for node
in f.maker.env.toposort()) in f.maker.env.toposort())
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论