Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
8b62d9e4
提交
8b62d9e4
authored
1月 28, 2010
作者:
James Bergstra
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
THEANORC supports multiple ":"-delimited theanorc files
上级
aa839c64
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
16 行增加
和
4 行删除
+16
-4
config.txt
doc/library/config.txt
+9
-2
configparser.py
theano/configparser.py
+7
-2
没有找到文件。
doc/library/config.txt
浏览文件 @
8b62d9e4
...
@@ -54,8 +54,8 @@ Environment Variables
...
@@ -54,8 +54,8 @@ Environment Variables
.. envvar:: THEANORC
.. envvar:: THEANORC
Th
is is the location of the .theanorc file which is in ConfigParser
Th
e location[s] of the .theanorc file[s] in ConfigParser format.
format.
It defaults to ``$HOME/.theanorc``.
It defaults to ``$HOME/.theanorc``.
Here is the .theanorc equivalent to the THEANO_FLAGS in the example above:
Here is the .theanorc equivalent to the THEANO_FLAGS in the example above:
...
@@ -68,6 +68,13 @@ Environment Variables
...
@@ -68,6 +68,13 @@ Environment Variables
[nvcc]
[nvcc]
fastmath = True
fastmath = True
Multiple configuration files can be specified by separating them with ':'
characters (as in $PATH). Multiple configuration files will be merged,
with earlier (left-most) files taking priority over later files in the
case that multiple files specify values for a common configuration option.
For example, to override system-wide settings with personal ones,
set ``THEANORC=~/.theanorc:/etc/theanorc``
The rest of this page describes some of the more common and important flags
The rest of this page describes some of the more common and important flags
that you might want to use. For the complete list (including documentation),
that you might want to use. For the complete list (including documentation),
import theano and print the config variable, as in:
import theano and print the config variable, as in:
...
...
theano/configparser.py
浏览文件 @
8b62d9e4
...
@@ -14,9 +14,14 @@ THEANO_FLAGS=os.getenv("THEANO_FLAGS","")
...
@@ -14,9 +14,14 @@ THEANO_FLAGS=os.getenv("THEANO_FLAGS","")
# [section.]option[=value] entries. If the section part is omited, their should be only one
# [section.]option[=value] entries. If the section part is omited, their should be only one
# section with that contain the gived option.
# section with that contain the gived option.
theano_cfg_path
=
os
.
getenv
(
'THEANORC'
,
'~/.theanorc'
)
# THEANORC=~/.theanorc:~lisa/.theanorc
def
config_files_from_theanorc
():
rval
=
[
os
.
path
.
expanduser
(
s
)
for
s
in
os
.
getenv
(
'THEANORC'
,
'~/.theanorc'
)
.
split
(
':'
)]
rval
.
reverse
()
print
"THEANORC"
,
rval
return
rval
theano_cfg
=
ConfigParser
.
SafeConfigParser
()
theano_cfg
=
ConfigParser
.
SafeConfigParser
()
theano_cfg
.
read
(
[
os
.
path
.
expanduser
(
theano_cfg_path
)]
)
theano_cfg
.
read
(
config_files_from_theanorc
()
)
def
parse_env_flags
(
flags
,
name
,
default_value
=
None
):
def
parse_env_flags
(
flags
,
name
,
default_value
=
None
):
#The value in the env variable THEANO_FLAGS override the previous value
#The value in the env variable THEANO_FLAGS override the previous value
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论