提交 69f1c9a3 authored 作者: Frédéric Bastien's avatar Frédéric Bastien

allow .theanorc.txt being used by default on windows.

上级 0995c896
......@@ -283,16 +283,15 @@ Windows V1(bigger install, but simpler instruction + try instruction for gpu)
(installation folder of theano)
In the USERPROFILE directory
you should create a configuration file .theanorc with the following
you should create a configuration file .theanorc.
.theanorc.txt is also accepted on Windows if the environment
variable THEANORC is not set. The file should have the following
two lines:
.. code-block:: bash
[blas]
ldflags =
(Create a text file in Windows Explorer and rename it from the DOS
box: "ren xyz.txt .theanorc".)
Space or non ascii caracter are not always supported. If that is your case,
Set the environment variable 'THEANO_FLAGS' to the value 'blas.ldflags='
......
......@@ -27,6 +27,9 @@ THEANO_FLAGS=os.getenv("THEANO_FLAGS","")
# precedence over those in files on the left.
def config_files_from_theanorc():
rval = [os.path.expanduser(s) for s in os.getenv('THEANORC', '~/.theanorc').split(os.pathsep)]
if os.getenv('THEANORC') is None and sys.platform=="win32":
#To don't need to change the filename and make it open easily
rval.append(os.path.expanduser('~/.theanorc.txt'))
return rval
theano_cfg = ConfigParser.SafeConfigParser()
theano_cfg.read(config_files_from_theanorc())
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论