提交 7be28f3d authored 作者: Razvan Pascanu's avatar Razvan Pascanu

moved import cuda where I need it.

上级 0fe8bcb1
...@@ -53,7 +53,7 @@ from theano.tensor import opt ...@@ -53,7 +53,7 @@ from theano.tensor import opt
from theano import tensor from theano import tensor
from theano import config from theano import config
from theano.updates import Updates from theano.updates import Updates
from theano.sandbox import cuda
import scan_op import scan_op
import scan_utils import scan_utils
...@@ -914,6 +914,8 @@ def scan( fn ...@@ -914,6 +914,8 @@ def scan( fn
shared_inner_outputs ) shared_inner_outputs )
if condition is not None: if condition is not None:
inner_outs.append(condition) inner_outs.append(condition)
from theano.sandbox import cuda
if cuda.cuda_available: if cuda.cuda_available:
# very often we end up in this situation when we want to # very often we end up in this situation when we want to
# replace w with w_copy, where w is CudaNdarray # replace w with w_copy, where w is CudaNdarray
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论