Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
35513e07
提交
35513e07
authored
12月 14, 2020
作者:
Michael Osthege
提交者:
Brandon T. Willard
12月 15, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make unused flags warning a method and use it in theano/__init__
This way all sub-packages get the chance to register their config variables without needing to be imported in theano.configdefaults.
上级
8b96d5f4
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
9 行增加
和
4 行删除
+9
-4
__init__.py
theano/__init__.py
+5
-0
configdefaults.py
theano/configdefaults.py
+0
-4
configparser.py
theano/configparser.py
+4
-0
没有找到文件。
theano/__init__.py
浏览文件 @
35513e07
...
...
@@ -199,3 +199,8 @@ def sparse_grad(var):
import
theano.tensor.random.var
from
theano.scan
import
checkpoints
,
clone
,
foldl
,
foldr
,
map
,
reduce
,
scan
# Some config variables are registered by submodules. Only after all those imports
# were executed, we can warn about remaining flags provided by the user through THEANO_FLAGS.
config
.
warn_unused_flags
()
theano/configdefaults.py
浏览文件 @
35513e07
...
...
@@ -2260,7 +2260,3 @@ except OSError:
# TODO: The caching dir resolution is a procedural mess of helper functions, local variables
# and config definitions. And the result is also not particularly pretty..
add_caching_dir_configvars
()
# Check if there are remaining flags provided by the user through THEANO_FLAGS.
for
key
in
config
.
_flags_dict
.
keys
():
warnings
.
warn
(
f
"Theano does not recognise this flag: {key}"
)
theano/configparser.py
浏览文件 @
35513e07
...
...
@@ -262,6 +262,10 @@ class TheanoConfigParser:
"""
return
_ChangeFlagsDecorator
(
*
args
,
_root
=
self
,
**
kwargs
)
def
warn_unused_flags
(
self
):
for
key
in
self
.
_flags_dict
.
keys
():
warnings
.
warn
(
f
"Theano does not recognise this flag: {key}"
)
class
ConfigParam
:
"""Base class of all kinds of configuration parameters.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论