提交 9a5da479 authored 作者: Frederic Bastien's avatar Frederic Bastien

Revert a recent change. Otherwise some tests break in FAST_COMPILE and we end up…

Revert a recent change. Otherwise some tests break in FAST_COMPILE and we end up with not as much optimized code.
上级 5211d560
......@@ -576,8 +576,11 @@ class Subtensor(Op):
if x.dtype.find('int') != -1:
first = x.zeros_like().astype(theano.config.floatX)
else:
first = IncSubtensor(self.idx_list,
set_instead_of_inc=True)(x.zeros_like(),
# For best optimization, we let this as an inc.
# This allow the opt local_IncSubtensor_serialize to apply first.
# We need to implement an optimization that will convert this to a
# set subtensor.
first = IncSubtensor(self.idx_list)(x.zeros_like(),
gz, *rest)
return ([first] + [DisconnectedType()()] * len(rest))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论