提交 25809a7a authored 作者: Frederic Bastien's avatar Frederic Bastien

if THEANO_GPU is -1 or CPU, we don't init the gpu stuff.

上级 91fd3c4f
......@@ -17,7 +17,12 @@ def use(device=None):
if use.device_number is None:
# No successful call to use() has been made yet
if device is None:
device = int(os.getenv("THEANO_GPU",0))
device = os.getenv("THEANO_GPU",0)
import pdb
pdb.set_trace()
if device=="-1" or device=="CPU":
return
device=int(device)
try:
cuda_ndarray.gpu_init(device)
handle_shared_float32(True)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论