提交 8d34f1cb authored 作者: Frederic Bastien's avatar Frederic Bastien

added comment.

上级 65e4270f
...@@ -324,6 +324,7 @@ def local_gpu_conv(node): ...@@ -324,6 +324,7 @@ def local_gpu_conv(node):
return ret return ret
if node.op == gpu_from_host: if node.op == gpu_from_host:
#gpu_from_host(conv) -> gpu_conv(gpu_from_host)
host_input = node.inputs[0] host_input = node.inputs[0]
if host_input.owner and isinstance(host_input.owner.op, theano.sandbox.conv.ConvOp): if host_input.owner and isinstance(host_input.owner.op, theano.sandbox.conv.ConvOp):
gpu_conv = GpuConvOp_from_ConvOp(host_input.owner.op) gpu_conv = GpuConvOp_from_ConvOp(host_input.owner.op)
...@@ -331,6 +332,7 @@ def local_gpu_conv(node): ...@@ -331,6 +332,7 @@ def local_gpu_conv(node):
return [gpu_conv(gpu_from_host(img), gpu_from_host(kern))] return [gpu_conv(gpu_from_host(img), gpu_from_host(kern))]
if isinstance(node.op, theano.sandbox.conv.ConvOp): if isinstance(node.op, theano.sandbox.conv.ConvOp):
#conv(host_from_gpu) -> host_from_gpu(gpu_conv)
img, kern = node.inputs img, kern = node.inputs
img_on_gpu = (img.owner and img.owner.op == host_from_gpu) img_on_gpu = (img.owner and img.owner.op == host_from_gpu)
kern_on_gpu = (kern.owner and kern.owner.op == host_from_gpu) kern_on_gpu = (kern.owner and kern.owner.op == host_from_gpu)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论