Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
377a5ce1
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
377a5ce1
编写于
6月 08, 2020
作者:
Q
qingqing01
提交者:
GitHub
6月 08, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clean fluid.compiler.CompiledProgram (#891)
上级
b5fa78bd
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
10 addition
and
13 deletion
+10
-13
slim/distillation/distill.py
slim/distillation/distill.py
+1
-1
slim/extensions/distill_pruned_model/distill_pruned_model.py
slim/extensions/distill_pruned_model/distill_pruned_model.py
+1
-1
slim/nas/train_nas.py
slim/nas/train_nas.py
+1
-1
slim/prune/eval.py
slim/prune/eval.py
+1
-2
slim/prune/prune.py
slim/prune/prune.py
+1
-1
slim/quantization/eval.py
slim/quantization/eval.py
+1
-2
slim/quantization/train.py
slim/quantization/train.py
+1
-1
slim/sensitive/sensitive.py
slim/sensitive/sensitive.py
+1
-1
tools/eval.py
tools/eval.py
+1
-2
tools/train.py
tools/train.py
+1
-1
未找到文件。
slim/distillation/distill.py
浏览文件 @
377a5ce1
...
@@ -305,7 +305,7 @@ def main():
...
@@ -305,7 +305,7 @@ def main():
build_strategy
=
build_strategy
,
build_strategy
=
build_strategy
,
exec_strategy
=
exec_strategy
)
exec_strategy
=
exec_strategy
)
compiled_eval_prog
=
fluid
.
compiler
.
CompiledProgram
(
eval_prog
)
compiled_eval_prog
=
fluid
.
CompiledProgram
(
eval_prog
)
# whether output bbox is normalized in model output layer
# whether output bbox is normalized in model output layer
is_bbox_normalized
=
False
is_bbox_normalized
=
False
...
...
slim/extensions/distill_pruned_model/distill_pruned_model.py
浏览文件 @
377a5ce1
...
@@ -276,7 +276,7 @@ def main():
...
@@ -276,7 +276,7 @@ def main():
loss_name
=
loss
.
name
,
loss_name
=
loss
.
name
,
build_strategy
=
build_strategy
,
build_strategy
=
build_strategy
,
exec_strategy
=
exec_strategy
)
exec_strategy
=
exec_strategy
)
compiled_eval_prog
=
fluid
.
compiler
.
CompiledProgram
(
eval_prog
)
compiled_eval_prog
=
fluid
.
CompiledProgram
(
eval_prog
)
# parse eval fetches
# parse eval fetches
extra_keys
=
[]
extra_keys
=
[]
...
...
slim/nas/train_nas.py
浏览文件 @
377a5ce1
...
@@ -323,7 +323,7 @@ def main():
...
@@ -323,7 +323,7 @@ def main():
build_strategy
=
build_strategy
,
build_strategy
=
build_strategy
,
exec_strategy
=
exec_strategy
)
exec_strategy
=
exec_strategy
)
if
FLAGS
.
eval
:
if
FLAGS
.
eval
:
compiled_eval_prog
=
fluid
.
compiler
.
CompiledProgram
(
eval_prog
)
compiled_eval_prog
=
fluid
.
CompiledProgram
(
eval_prog
)
train_loader
.
set_sample_list_generator
(
train_reader
,
place
)
train_loader
.
set_sample_list_generator
(
train_reader
,
place
)
...
...
slim/prune/eval.py
浏览文件 @
377a5ce1
...
@@ -119,8 +119,7 @@ def main():
...
@@ -119,8 +119,7 @@ def main():
logger
.
info
(
"pruned FLOPS: {}"
.
format
(
logger
.
info
(
"pruned FLOPS: {}"
.
format
(
float
(
base_flops
-
pruned_flops
)
/
base_flops
))
float
(
base_flops
-
pruned_flops
)
/
base_flops
))
compile_program
=
fluid
.
compiler
.
CompiledProgram
(
compile_program
=
fluid
.
CompiledProgram
(
eval_prog
).
with_data_parallel
()
eval_prog
).
with_data_parallel
()
assert
cfg
.
metric
!=
'OID'
,
"eval process of OID dataset
\
assert
cfg
.
metric
!=
'OID'
,
"eval process of OID dataset
\
is not supported."
is not supported."
...
...
slim/prune/prune.py
浏览文件 @
377a5ce1
...
@@ -215,7 +215,7 @@ def main():
...
@@ -215,7 +215,7 @@ def main():
logger
.
info
(
"FLOPs -{}; total FLOPs: {}; pruned FLOPs: {}"
.
format
(
logger
.
info
(
"FLOPs -{}; total FLOPs: {}; pruned FLOPs: {}"
.
format
(
float
(
base_flops
-
pruned_flops
)
/
base_flops
,
base_flops
,
float
(
base_flops
-
pruned_flops
)
/
base_flops
,
base_flops
,
pruned_flops
))
pruned_flops
))
compiled_eval_prog
=
fluid
.
compiler
.
CompiledProgram
(
eval_prog
)
compiled_eval_prog
=
fluid
.
CompiledProgram
(
eval_prog
)
if
FLAGS
.
resume_checkpoint
:
if
FLAGS
.
resume_checkpoint
:
checkpoint
.
load_checkpoint
(
exe
,
train_prog
,
FLAGS
.
resume_checkpoint
)
checkpoint
.
load_checkpoint
(
exe
,
train_prog
,
FLAGS
.
resume_checkpoint
)
...
...
slim/quantization/eval.py
浏览文件 @
377a5ce1
...
@@ -132,8 +132,7 @@ def main():
...
@@ -132,8 +132,7 @@ def main():
checkpoint
.
load_params
(
exe
,
eval_prog
,
cfg
.
weights
)
checkpoint
.
load_params
(
exe
,
eval_prog
,
cfg
.
weights
)
eval_prog
=
convert
(
eval_prog
,
place
,
config
,
save_int8
=
False
)
eval_prog
=
convert
(
eval_prog
,
place
,
config
,
save_int8
=
False
)
compile_program
=
fluid
.
compiler
.
CompiledProgram
(
compile_program
=
fluid
.
CompiledProgram
(
eval_prog
).
with_data_parallel
()
eval_prog
).
with_data_parallel
()
results
=
eval_run
(
exe
,
compile_program
,
loader
,
keys
,
values
,
cls
,
cfg
,
results
=
eval_run
(
exe
,
compile_program
,
loader
,
keys
,
values
,
cls
,
cfg
,
sub_eval_prog
,
sub_keys
,
sub_values
)
sub_eval_prog
,
sub_keys
,
sub_values
)
...
...
slim/quantization/train.py
浏览文件 @
377a5ce1
...
@@ -200,7 +200,7 @@ def main():
...
@@ -200,7 +200,7 @@ def main():
if
FLAGS
.
eval
:
if
FLAGS
.
eval
:
# insert quantize op in eval_prog
# insert quantize op in eval_prog
eval_prog
=
quant_aware
(
eval_prog
,
place
,
config
,
for_test
=
True
)
eval_prog
=
quant_aware
(
eval_prog
,
place
,
config
,
for_test
=
True
)
compiled_eval_prog
=
fluid
.
compiler
.
CompiledProgram
(
eval_prog
)
compiled_eval_prog
=
fluid
.
CompiledProgram
(
eval_prog
)
start_iter
=
0
start_iter
=
0
if
FLAGS
.
resume_checkpoint
:
if
FLAGS
.
resume_checkpoint
:
...
...
slim/sensitive/sensitive.py
浏览文件 @
377a5ce1
...
@@ -122,7 +122,7 @@ def main():
...
@@ -122,7 +122,7 @@ def main():
def
test
(
program
):
def
test
(
program
):
compiled_eval_prog
=
fluid
.
compiler
.
CompiledProgram
(
program
)
compiled_eval_prog
=
fluid
.
CompiledProgram
(
program
)
results
=
eval_run
(
results
=
eval_run
(
exe
,
exe
,
...
...
tools/eval.py
浏览文件 @
377a5ce1
...
@@ -88,8 +88,7 @@ def main():
...
@@ -88,8 +88,7 @@ def main():
cfg
.
metric
,
json_directory
=
FLAGS
.
output_eval
,
dataset
=
dataset
)
cfg
.
metric
,
json_directory
=
FLAGS
.
output_eval
,
dataset
=
dataset
)
return
return
compile_program
=
fluid
.
compiler
.
CompiledProgram
(
compile_program
=
fluid
.
CompiledProgram
(
eval_prog
).
with_data_parallel
()
eval_prog
).
with_data_parallel
()
assert
cfg
.
metric
!=
'OID'
,
"eval process of OID dataset
\
assert
cfg
.
metric
!=
'OID'
,
"eval process of OID dataset
\
is not supported."
is not supported."
...
...
tools/train.py
浏览文件 @
377a5ce1
...
@@ -180,7 +180,7 @@ def main():
...
@@ -180,7 +180,7 @@ def main():
exec_strategy
=
exec_strategy
)
exec_strategy
=
exec_strategy
)
if
FLAGS
.
eval
:
if
FLAGS
.
eval
:
compiled_eval_prog
=
fluid
.
compiler
.
CompiledProgram
(
eval_prog
)
compiled_eval_prog
=
fluid
.
CompiledProgram
(
eval_prog
)
fuse_bn
=
getattr
(
model
.
backbone
,
'norm_type'
,
None
)
==
'affine_channel'
fuse_bn
=
getattr
(
model
.
backbone
,
'norm_type'
,
None
)
==
'affine_channel'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录