Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
39c07e62
提交
39c07e62
authored
11月 27, 2013
作者:
Frédéric Bastien
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1557 from jbornschein/patch-1
Remove unsused code (minor)
上级
ab660ca3
36c50566
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
9 行增加
和
13 行删除
+9
-13
debugmode.py
theano/compile/debugmode.py
+4
-7
function_module.py
theano/compile/function_module.py
+5
-6
没有找到文件。
theano/compile/debugmode.py
浏览文件 @
39c07e62
...
...
@@ -2101,17 +2101,14 @@ class _Maker(FunctionMaker): # inheritance buys a few helper functions
# Check if some input variables are unused
self
.
_check_unused_inputs
(
inputs
,
outputs
,
on_unused_input
)
#TODO: REMOVE THIS CRUFT - it's complicated for SymbolicInputKits
# Make a list of (SymbolicInput|SymblicInputKits, indices, [SymbolicInput,...]), one
# tuple for each input. (See Function.indices for more details)
indices
=
[[
input
]
+
self
.
expand_in
(
input
,
_inputs
)
for
input
in
inputs
]
expanded_inputs
=
reduce
(
list
.
__add__
,
[
list
(
z
)
for
x
,
y
,
z
in
indices
],
[])
assert
expanded_inputs
==
inputs
#JB - I added this to make sure we could delete above
# make the fgraph
for
i
in
xrange
(
mode
.
stability_patience
):
fgraph
,
additional_outputs
,
equivalence_tracker
=
_optcheck_fgraph
(
expanded_
inputs
,
outputs
,
accept_inplace
)
inputs
,
outputs
,
accept_inplace
)
fgraph
.
equivalence_tracker
=
equivalence_tracker
# optimize the fgraph
...
...
@@ -2189,7 +2186,7 @@ class _Maker(FunctionMaker): # inheritance buys a few helper functions
self
.
indices
=
indices
self
.
inputs
=
inputs
self
.
expanded_inputs
=
expanded_
inputs
self
.
expanded_inputs
=
inputs
self
.
outputs
=
outputs
self
.
unpack_single
=
unpack_single
self
.
return_none
=
return_none
...
...
theano/compile/function_module.py
浏览文件 @
39c07e62
...
...
@@ -999,13 +999,12 @@ class FunctionMaker(object):
# Check if some input variables are unused
self
.
_check_unused_inputs
(
inputs
,
outputs
,
on_unused_input
)
#TODO: REMOVE THIS CRUFT - it's complicated for SymbolicInputKits
# Make a list of (SymbolicInput|SymblicInputKits, indices, [SymbolicInput,...]), one
# tuple for each input. (See Function.indices for more details)
indices
=
[[
input
]
+
self
.
expand_in
(
input
,
_inputs
)
for
input
in
inputs
]
expanded_inputs
=
reduce
(
list
.
__add__
,
[
list
(
z
)
for
x
,
y
,
z
in
indices
],
[])
assert
expanded_inputs
==
inputs
# JB - I added this to make sure we could delete above
# make the fgraph (copies the graph, creates NEW INPUT AND OUTPUT VARIABLES)
fgraph
,
additional_outputs
=
std_fgraph
(
expanded_
inputs
,
outputs
,
accept_inplace
)
fgraph
,
additional_outputs
=
std_fgraph
(
inputs
,
outputs
,
accept_inplace
)
fgraph
.
profile
=
profile
self
.
fgraph
=
fgraph
...
...
@@ -1053,11 +1052,11 @@ class FunctionMaker(object):
if
hasattr
(
linker
,
'accept_var_updates'
):
# hacky thing so VMLinker knows about updates
self
.
linker
.
accept_var_updates
(
fgraph_updated_vars
(
fgraph
,
expanded_
inputs
))
fgraph_updated_vars
(
fgraph
,
inputs
))
self
.
indices
=
indices
self
.
inputs
=
inputs
self
.
expanded_inputs
=
expanded_
inputs
self
.
expanded_inputs
=
inputs
self
.
outputs
=
outputs
self
.
unpack_single
=
unpack_single
self
.
return_none
=
return_none
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论