Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
7f1f0fe9
提交
7f1f0fe9
authored
7月 08, 2014
作者:
Hengjean
提交者:
Frederic
10月 21, 2014
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Reversed useless refactoring.
上级
80db2da2
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
18 行增加
和
6 行删除
+18
-6
function_module.py
theano/compile/function_module.py
+5
-5
fg.py
theano/gof/fg.py
+6
-1
toolbox.py
theano/gof/toolbox.py
+6
-0
opt.py
theano/tensor/opt.py
+1
-0
没有找到文件。
theano/compile/function_module.py
浏览文件 @
7f1f0fe9
...
...
@@ -1085,7 +1085,7 @@ class FunctionMaker(object):
# the inputs, outputs, and size of the graph to be optimized
inputs_new
=
fgraph
.
inputs
outputs_new
=
fgraph
.
outputs
size_new
=
len
(
fgraph
.
nodes
)
size_new
=
len
(
fgraph
.
apply_
nodes
)
need_optimize
=
False
get_lock
()
'''
...
...
@@ -1117,7 +1117,7 @@ class FunctionMaker(object):
for
i
,
graph_old
in
enumerate
(
graph_db
.
keys
()):
inputs_old
=
graph_old
.
inputs
outputs_old
=
graph_old
.
outputs
size_old
=
len
(
graph_old
.
nodes
)
size_old
=
len
(
graph_old
.
apply_
nodes
)
print
'looping through graph_db
%
d/
%
d'
%
(
i
+
1
,
len
(
graph_db
))
# Some heuristics to check is the same graphs have
# already been optimized before.
...
...
@@ -1155,13 +1155,13 @@ class FunctionMaker(object):
def
removeAllFgraph
(
remove
):
if
hasattr
(
remove
,
'fgraph'
):
remove
.
fgraph
=
None
del
remove
.
fgraph
if
hasattr
(
remove
,
'owner'
):
if
remove
.
owner
==
None
:
remove
.
fgraph
=
None
pass
else
:
if
hasattr
(
remove
.
owner
,
'fgraph'
):
remove
.
owner
.
fgraph
=
None
del
remove
.
owner
.
fgraph
if
hasattr
(
remove
.
owner
,
'inputs'
):
remove
.
owner
.
inputs
=
[
removeAllFgraph
(
i
)
for
i
in
remove
.
owner
.
inputs
]
...
...
theano/gof/fg.py
浏览文件 @
7f1f0fe9
...
...
@@ -753,7 +753,12 @@ class FunctionGraph(utils.object2):
for
attr
in
getattr
(
feature
,
"pickle_rm_attr"
,
[]):
del
d
[
attr
]
# The class Updater take fct as parameter and they are lambda function, so unpicklable.
# del d["execute_callbacks_times"]
# execute_callbacks_times have reference to optimizer, and they can't
# be pickled as the decorators with parameters aren't pickable.
if
"execute_callbacks_times"
in
d
:
del
d
[
"execute_callbacks_times"
]
return
d
def
__setstate__
(
self
,
dct
):
...
...
theano/gof/toolbox.py
浏览文件 @
7f1f0fe9
...
...
@@ -297,6 +297,12 @@ class ReplaceValidate(History, Validator):
print
>>
out
,
reason
,
replacements
raise
ReplacementDidntRemovedError
()
def
__getstate__
(
self
):
d
=
self
.
__dict__
.
copy
()
if
"history"
in
d
:
del
d
[
"history"
]
return
d
class
NodeFinder
(
Bookkeeper
):
...
...
theano/tensor/opt.py
浏览文件 @
7f1f0fe9
...
...
@@ -2664,6 +2664,7 @@ def local_useless_tile(node):
except
NotScalarConstantError
:
return
################
# Flatten Opts #
################
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论