提交 6bd132c5 authored 作者: Simon Lemieux's avatar Simon Lemieux

looking for cuda_enabled instead of config.device.startswith('gpu')

上级 6797e52e
......@@ -4,7 +4,7 @@ import theano.tensor as T
from theano.tensor.opt import register_specialize
from theano.gof import local_optimizer
from theano.sandbox.cuda import cuda_available
from theano.sandbox.cuda import cuda_available, cuda_enabled
if cuda_available:
from theano.sandbox.cuda import CudaNdarrayType
from theano.sandbox.cuda.basic_ops import host_from_gpu, gpu_from_host
......@@ -260,6 +260,6 @@ gpu_multinomial = GpuMultinomial()
def use_gpu_multinomial(node):
if node.op == multinomial:
return [host_from_gpu(gpu_multinomial(*[gpu_from_host(i) for i in node.inputs]))]
if theano.config.device.startswith('gpu'):
if cuda_enabled:#theano.config.device.startswith('gpu'):
register_specialize(use_gpu_multinomial)
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论