提交 482f2170 authored 作者: Frederic Bastien's avatar Frederic Bastien

flake8

上级 57da13ea
...@@ -935,7 +935,7 @@ def local_gpua_lazy_ifelse(op, context_name, inputs, outputs): ...@@ -935,7 +935,7 @@ def local_gpua_lazy_ifelse(op, context_name, inputs, outputs):
# ifelse need corresponding true/false inputs variables to be of the same type. # ifelse need corresponding true/false inputs variables to be of the same type.
# But we can't rely on inputs to respect that, as GraphToGPU don't enforce that. # But we can't rely on inputs to respect that, as GraphToGPU don't enforce that.
# So we need to take care of this here. # So we need to take care of this here.
for v1, v2 in zip(inputs[1:1+op.n_outs], inputs[1+op.n_outs:]): for v1, v2 in zip(inputs[1:1 + op.n_outs], inputs[1 + op.n_outs:]):
if ((isinstance(v1.type, tensor.TensorType) and move_to_gpu(v1)) or if ((isinstance(v1.type, tensor.TensorType) and move_to_gpu(v1)) or
isinstance(v1.type, GpuArrayType) or isinstance(v1.type, GpuArrayType) or
isinstance(v2.type, GpuArrayType)): isinstance(v2.type, GpuArrayType)):
......
...@@ -275,7 +275,7 @@ class test_gpu_ifelse(test_ifelse.test_ifelse): ...@@ -275,7 +275,7 @@ class test_gpu_ifelse(test_ifelse.test_ifelse):
a = theano.ifelse.ifelse(x, y, z) a = theano.ifelse.ifelse(x, y, z)
with theano.configparser.change_flags(on_opt_error='raise'): with theano.configparser.change_flags(on_opt_error='raise'):
f = theano.function([x], [a], mode=mode_with_gpu) theano.function([x], [a], mode=mode_with_gpu)
def test_print_op(): def test_print_op():
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论