提交 18f27c44 authored 作者: Frédéric Bastien's avatar Frédéric Bastien 提交者: GitHub

Merge pull request #5473 from notoraptor/fix-theano-cache-with-gpu

(small fix) Update `theano-cache` to prevent an error message printed when `device=cuda` on Windows.
...@@ -5,11 +5,11 @@ import os ...@@ -5,11 +5,11 @@ import os
import sys import sys
if sys.platform == 'win32': if sys.platform == 'win32':
config_cxx = 'cxx=' config_for_theano_cache_script = 'cxx=,device=cpu'
theano_flags = os.environ['THEANO_FLAGS'] if 'THEANO_FLAGS' in os.environ else '' theano_flags = os.environ['THEANO_FLAGS'] if 'THEANO_FLAGS' in os.environ else ''
if theano_flags: if theano_flags:
theano_flags += ',' theano_flags += ','
theano_flags += config_cxx theano_flags += config_for_theano_cache_script
os.environ['THEANO_FLAGS'] = theano_flags os.environ['THEANO_FLAGS'] = theano_flags
import theano import theano
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论