提交 5d70bb08 authored 作者: Olivier Breuleux's avatar Olivier Breuleux

fixed theano_opt.gemm_pattern_1

上级 d08563a8
......@@ -4,14 +4,14 @@ from elemwise import Elemwise, DimShuffle
import scalar
import tensor as T
# gemm: (d,a,b,c,s) -> d = d*s + a*dot(b,c)
gemm_pattern_1 = gof.PatternSub((T.sub_inplace,
'd',
(T.mul,
dict(pattern = (T.DimShuffle((), ['x', 'x'], inplace = True), 'a'),
allow_multiple_clients = True),
(T.dot, 'b', 'c'))),
(T.gemm, 'd', 'a', 'b', 'c', T.constant(-1.0)),
(T.gemm, 'd', (T.neg, 'a'), 'b', 'c', T.constant(1.0)),
allow_multiple_clients = False)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论