提交 3062a252 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Don't give up after a single input that can't be moved.

上级 3fad7db3
......@@ -45,12 +45,12 @@ class InputToGpuOptimizer(Optimizer):
def apply(self, fgraph):
for input in fgraph.inputs:
if isinstance(input.type, GpuArrayType):
return
continue
if (len(input.clients) == 1 and
(input.clients[0][0] == 'output' or
input.clients[0][0].op == gpu_from_host)):
return
continue
try:
new_input = host_from_gpu(gpu_from_host(input))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论