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

Merge pull request #5025 from medakk/patch_1

Fix Theano deprecation warning
......@@ -10,7 +10,7 @@ import sys
import warnings
from functools import wraps
from six import StringIO
from six import StringIO, PY3
import theano
from theano.compat import configparser as ConfigParser
......@@ -73,7 +73,8 @@ def 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]),
'LSCRATCH': os.getenv("LSCRATCH", ""),
'TMPDIR': os.getenv("TMPDIR", ""),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论