提交 c0716dc6 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

reverted fixed pushed yesturday

The problem was that CudaNdarrays would not allow you to zero some part of them. My fix was to allocate a ndarray and have then the CudaNdarray setitem to copy that memory on the card. Fred fixed the bug on the CudaNdarray side though so this fix (which is suboptimal) is not needed anymore.
上级 c11d8728
...@@ -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]:] = numpy.zeros_like(outs[idx][0][i - self.mintaps[idx]:]) outs[idx][0][i - self.mintaps[idx]:] = 0
# 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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论