提交 6119149b authored 作者: Frederic Bastien's avatar Frederic Bastien

Clean up and maybe fix gh-5273. No test for the fix to issue.

上级 735cb923
...@@ -703,19 +703,8 @@ second dimension ...@@ -703,19 +703,8 @@ second dimension
if bcast and not outs[0].broadcastable[j]] if bcast and not outs[0].broadcastable[j]]
if to_sum: if to_sum:
shuffle = [] sr = theano.tensor.basic.sum(
j = 0 rval[i], axis=to_sum, keepdims=True)
for bcast in ipt.type.broadcastable:
if bcast == 1:
shuffle.append('x')
else:
shuffle.append(j)
j += 1
# close if
# close for
sr = Sum(axis=to_sum)(rval[i])
sr = sr.dimshuffle(shuffle)
# sr = DimShuffle(sr.type.broadcastable, shuffle)(sr)
rval[i] = sr rval[i] = sr
# close if # close if
# close for # close for
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论