提交 d880fefd authored 作者: Ian Goodfellow's avatar Ian Goodfellow

fixed bug that made scan fail to compile on gpu in some cases

上级 dd4f0c5c
...@@ -971,7 +971,7 @@ class Scan(PureOp): ...@@ -971,7 +971,7 @@ class Scan(PureOp):
# expected to return 0 for all entries for which the gradient is # expected to return 0 for all entries for which the gradient is
# not actually computed # not actually computed
elif store_steps[idx] > i - self.mintaps[idx]: elif store_steps[idx] > i - self.mintaps[idx]:
outs[idx][0][i - self.mintaps[idx]:] = 0 outs[idx][0][i - self.mintaps[idx]:] = numpy.zeros_like(outs[idx][0][i - self.mintaps[idx]:])
# This is a fix for a bug introduced by while. If you say # This is a fix for a bug introduced by while. If you say
# you want to loop up to a condition, you expect the output # you want to loop up to a condition, you expect the output
# to have that length ( and not the maximal length possible) # to have that length ( and not the maximal length possible)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论