提交 55e52cf8 authored 作者: --global's avatar --global

Add check to ensure that first input is HostFromGpu

上级 a92b7304
...@@ -526,8 +526,11 @@ def local_gpua_softmaxwithbias(node): ...@@ -526,8 +526,11 @@ def local_gpua_softmaxwithbias(node):
@register_opt('fast_compile') @register_opt('fast_compile')
@op_lifter([theano.tensor.opt.Assert]) @op_lifter([theano.tensor.opt.Assert])
def local_assert(node): def local_assert(node):
return [host_from_gpu(node.op(node.inputs[0].owner.inputs[0], if (node.inputs[0].owner and
*node.inputs[1:]))] isinstance(node.inputs[0].owner.op, HostFromGpu):
return [host_from_gpu(node.op(node.inputs[0].owner.inputs[0],
*node.inputs[1:]))]
@register_opt('fast_compile') @register_opt('fast_compile')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论