提交 94c8bc56 authored 作者: James Bergstra's avatar James Bergstra

Fred answered question about dot22scalar test

上级 edd6707d
...@@ -601,13 +601,12 @@ def test_dot22scalar(): ...@@ -601,13 +601,12 @@ def test_dot22scalar():
f = theano.function([a,b,c],0.2*c *a*T.dot(a,b),mode=mode_blas_opt) f = theano.function([a,b,c],0.2*c *a*T.dot(a,b),mode=mode_blas_opt)
topo = f.maker.env.toposort() topo = f.maker.env.toposort()
#currently the canonizer don't always merge all Mul together... #currently the canonizer don't always merge all Mul together...
#that force the optimizer to make a recursive search witch it don't do now. # dot22scalar optimizer does not do a recursive search
#but it do it for 1 level of recursion. # therefore, it doesn't find potential matches of the scalar.
# TODO: combine with the 'canonicalization' that is part of the Gemm optimizer.
#
# assert _dot22scalar in [x.op for x in topo] # assert _dot22scalar in [x.op for x in topo]
# assert len(topo)==2 # assert len(topo)==2
### Fred,
### What are you talking about?
### -James (March 28 2010)
f(av,bv,cv) f(av,bv,cv)
f = theano.function([a,b,c],c * a*0.2*T.dot(a,b),mode=m2) f = theano.function([a,b,c],c * a*0.2*T.dot(a,b),mode=m2)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论