Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
3c089d9e
提交
3c089d9e
authored
3月 02, 2010
作者:
Frederic Bastien
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
print each theano fct profile separatly even if they have the same name or no name.
上级
842cc29e
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
8 行增加
和
5 行删除
+8
-5
function_module.py
theano/compile/function_module.py
+4
-4
profilemode.py
theano/compile/profilemode.py
+4
-1
没有找到文件。
theano/compile/function_module.py
浏览文件 @
3c089d9e
...
@@ -510,8 +510,8 @@ class Function(object):
...
@@ -510,8 +510,8 @@ class Function(object):
dt_call
=
time
.
time
()
-
t0
dt_call
=
time
.
time
()
-
t0
if
hasattr
(
self
.
maker
.
mode
,
'fct_call_time'
):
if
hasattr
(
self
.
maker
.
mode
,
'fct_call_time'
):
self
.
maker
.
mode
.
fct_call_time
[
self
.
name
]
+=
dt_call
self
.
maker
.
mode
.
fct_call_time
[
self
]
+=
dt_call
self
.
maker
.
mode
.
fct_call
[
self
.
name
]
+=
1
self
.
maker
.
mode
.
fct_call
[
self
]
+=
1
self
.
maker
.
mode
.
call_time
+=
dt_call
self
.
maker
.
mode
.
call_time
+=
dt_call
self
.
maker
.
mode
.
fn_time
+=
dt_fn
self
.
maker
.
mode
.
fn_time
+=
dt_fn
...
@@ -952,9 +952,9 @@ def orig_function(inputs, outputs, mode=None, accept_inplace = False, name=None)
...
@@ -952,9 +952,9 @@ def orig_function(inputs, outputs, mode=None, accept_inplace = False, name=None)
fn
.
name
=
name
fn
.
name
=
name
if
hasattr
(
mode
,
'fct_call_time'
):
if
hasattr
(
mode
,
'fct_call_time'
):
mode
.
fct_call_time
.
setdefault
(
name
,
0
)
mode
.
fct_call_time
.
setdefault
(
fn
,
0
)
if
hasattr
(
mode
,
'fct_call'
):
if
hasattr
(
mode
,
'fct_call'
):
mode
.
fct_call
.
setdefault
(
name
,
0
)
mode
.
fct_call
.
setdefault
(
fn
,
0
)
return
fn
return
fn
...
...
theano/compile/profilemode.py
浏览文件 @
3c089d9e
...
@@ -296,8 +296,11 @@ class ProfileMode(Mode):
...
@@ -296,8 +296,11 @@ class ProfileMode(Mode):
print
print
print
'Theano fct summary: <
%
total fct time> <total time> <time per call> <nb call> <fct name>'
print
'Theano fct summary: <
%
total fct time> <total time> <time per call> <nb call> <fct name>'
for
key
in
fct_call
.
keys
():
for
key
in
fct_call
.
keys
():
if
fct_call
[
key
]
>
0
:
print
'
%4.1
f
%% %.3
fs
%.2
es
%
d
%
s'
%
(
fct_call_time
[
key
]
/
total_fct_time
*
100
,
fct_call_time
[
key
],
print
'
%4.1
f
%% %.3
fs
%.2
es
%
d
%
s'
%
(
fct_call_time
[
key
]
/
total_fct_time
*
100
,
fct_call_time
[
key
],
fct_call_time
[
key
]
/
fct_call
[
key
],
fct_call
[
key
],
key
)
fct_call_time
[
key
]
/
fct_call
[
key
],
fct_call
[
key
],
key
.
name
)
else
:
print
' NOT CALLED'
,
key
.
name
print
print
print
'Time since import
%.3
fs'
%
(
total_time
)
print
'Time since import
%.3
fs'
%
(
total_time
)
print
'Compile time:
%.3
fs
%.1
f
%%
'
%
(
compile_time
,
compile_time
/
total_time
*
100
)
print
'Compile time:
%.3
fs
%.1
f
%%
'
%
(
compile_time
,
compile_time
/
total_time
*
100
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论