提交 cdd05bcf authored 作者: medakk's avatar medakk

Fix Theano deprecation warning

上级 853cf7e6
...@@ -10,7 +10,7 @@ import sys ...@@ -10,7 +10,7 @@ import sys
import warnings import warnings
from functools import wraps from functools import wraps
from six import StringIO from six import StringIO, PY3
import theano import theano
from theano.compat import configparser as ConfigParser from theano.compat import configparser as ConfigParser
...@@ -73,7 +73,8 @@ def config_files_from_theanorc(): ...@@ -73,7 +73,8 @@ def config_files_from_theanorc():
config_files = config_files_from_theanorc() config_files = config_files_from_theanorc()
theano_cfg = ConfigParser.SafeConfigParser( theano_cfg = (ConfigParser.ConfigParser if PY3
else ConfigParser.SafeConfigParser)(
{'USER': os.getenv("USER", os.path.split(os.path.expanduser('~'))[-1]), {'USER': os.getenv("USER", os.path.split(os.path.expanduser('~'))[-1]),
'LSCRATCH': os.getenv("LSCRATCH", ""), 'LSCRATCH': os.getenv("LSCRATCH", ""),
'TMPDIR': os.getenv("TMPDIR", ""), 'TMPDIR': os.getenv("TMPDIR", ""),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论