提交 c851b210 authored 作者: Frederic Bastien's avatar Frederic Bastien

Loop over the updates and not all inputs.

上级 4f41261f
...@@ -1030,10 +1030,10 @@ class Function(object): ...@@ -1030,10 +1030,10 @@ class Function(object):
if (hasattr(theano, "gpuarray") and if (hasattr(theano, "gpuarray") and
theano.gpuarray.pygpu_activated): theano.gpuarray.pygpu_activated):
import pygpu import pygpu
for i, inp in enumerate(self.input_storage): for i in self.maker.fgraph.update_mapping.values():
if i in self.maker.fgraph.update_mapping.values(): inp = self.input_storage[i]
if isinstance(inp.data, pygpu.gpuarray.GpuArray): if isinstance(inp.data, pygpu.gpuarray.GpuArray):
inp.data.sync() inp.data.sync()
# pickling/deepcopy support for Function # pickling/deepcopy support for Function
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论