提交 3c02fd50 authored 作者: Frederic's avatar Frederic

Fix optimizatin error/skipped when having 2 broadcastable vector.

dot22scalar can't use the dot22 index for the scalar!
上级 d531d77b
...@@ -1949,9 +1949,9 @@ def local_dot22_to_dot22scalar(node): ...@@ -1949,9 +1949,9 @@ def local_dot22_to_dot22scalar(node):
scalar_idx = -1 scalar_idx = -1
for i, x in enumerate(node.inputs): for i, x in enumerate(node.inputs):
if (i_scalar[i] is not None if (i != dot22_idx and i_scalar[i] is not None and
and (theano.scalar.upcast(x.type.dtype, d.type.dtype) (theano.scalar.upcast(x.type.dtype, d.type.dtype) ==
== d.type.dtype)): d.type.dtype)):
scalar_idx = i scalar_idx = i
break break
if scalar_idx < 0: if scalar_idx < 0:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论