Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
0d1721e6
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0d1721e6
编写于
9月 24, 2020
作者:
S
still-wait
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
clean useless log in DataLoader
上级
5549e083
变更
16
显示空白变更内容
内联
并排
Showing
16 changed file
with
44 addition
and
22 deletion
+44
-22
.gitignore
.gitignore
+3
-0
docs/advanced_tutorials/READER.md
docs/advanced_tutorials/READER.md
+1
-1
slim/distillation/distill.py
slim/distillation/distill.py
+4
-2
slim/extensions/distill_pruned_model/distill_pruned_model.py
slim/extensions/distill_pruned_model/distill_pruned_model.py
+4
-2
slim/nas/train_nas.py
slim/nas/train_nas.py
+4
-3
slim/prune/eval.py
slim/prune/eval.py
+2
-1
slim/prune/infer.py
slim/prune/infer.py
+2
-1
slim/prune/prune.py
slim/prune/prune.py
+2
-1
slim/quantization/eval.py
slim/quantization/eval.py
+2
-1
slim/quantization/infer.py
slim/quantization/infer.py
+2
-1
slim/quantization/train.py
slim/quantization/train.py
+4
-2
slim/sensitive/sensitive.py
slim/sensitive/sensitive.py
+2
-1
tools/eval.py
tools/eval.py
+2
-1
tools/infer.py
tools/infer.py
+2
-1
tools/train.py
tools/train.py
+4
-2
tools/train_multi_machine.py
tools/train_multi_machine.py
+4
-2
未找到文件。
.gitignore
浏览文件 @
0d1721e6
...
...
@@ -13,6 +13,9 @@ __pycache__/
# json file
*.json
# log file
*.log
# Distribution / packaging
/bin/
/build/
...
...
docs/advanced_tutorials/READER.md
浏览文件 @
0d1721e6
...
...
@@ -406,7 +406,7 @@ reader = create_reader(cfg.EvalReader)
# infer
reader = create_reader(cfg.TestReader)
# 将reader设置为DataLoader数据源
loader.set_sample_list_generator(reader
, place
)
loader.set_sample_list_generator(reader)
```
在运行程序中设置完数据处理模块后,就可以开始训练、评估与测试了,具体请参考相应运行程序python源码。
...
...
slim/distillation/distill.py
浏览文件 @
0d1721e6
...
...
@@ -160,7 +160,8 @@ def main():
start_iter
=
0
train_reader
=
create_reader
(
cfg
.
TrainReader
,
(
cfg
.
max_iters
-
start_iter
)
*
devices_num
,
cfg
)
train_loader
.
set_sample_list_generator
(
train_reader
,
place
)
# When iterable mode, set set_sample_list_generator(train_reader, place)
train_loader
.
set_sample_list_generator
(
train_reader
)
# get all student variables
student_vars
=
[]
...
...
@@ -183,7 +184,8 @@ def main():
eval_prog
=
eval_prog
.
clone
(
True
)
eval_reader
=
create_reader
(
cfg
.
EvalReader
)
eval_loader
.
set_sample_list_generator
(
eval_reader
,
place
)
# When iterable mode, set set_sample_list_generator(eval_reader, place)
eval_loader
.
set_sample_list_generator
(
eval_reader
)
# parse eval fetches
extra_keys
=
[]
...
...
slim/extensions/distill_pruned_model/distill_pruned_model.py
浏览文件 @
0d1721e6
...
...
@@ -149,7 +149,8 @@ def main():
start_iter
=
0
train_reader
=
create_reader
(
cfg
.
TrainReader
,
(
cfg
.
max_iters
-
start_iter
)
*
devices_num
,
cfg
)
train_loader
.
set_sample_list_generator
(
train_reader
,
place
)
# When iterable mode, set set_sample_list_generator(train_reader, place)
train_loader
.
set_sample_list_generator
(
train_reader
)
eval_prog
=
fluid
.
Program
()
with
fluid
.
program_guard
(
eval_prog
,
fluid
.
default_startup_program
()):
...
...
@@ -161,7 +162,8 @@ def main():
eval_prog
=
eval_prog
.
clone
(
True
)
eval_reader
=
create_reader
(
cfg
.
EvalReader
)
eval_loader
.
set_sample_list_generator
(
eval_reader
,
place
)
# When iterable mode, set set_sample_list_generator(eval_reader, place)
eval_loader
.
set_sample_list_generator
(
eval_reader
)
teacher_cfg
=
load_config
(
FLAGS
.
teacher_config
)
merge_config
(
FLAGS
.
opt
)
...
...
slim/nas/train_nas.py
浏览文件 @
0d1721e6
...
...
@@ -296,7 +296,8 @@ def main():
fetches
=
archs
(
feed_vars
,
'eval'
,
cfg
)
eval_prog
=
eval_prog
.
clone
(
True
)
eval_loader
.
set_sample_list_generator
(
eval_reader
,
place
)
# When iterable mode, set set_sample_list_generator(eval_reader, place)
eval_loader
.
set_sample_list_generator
(
eval_reader
)
extra_keys
=
[
'im_id'
,
'im_shape'
,
'gt_bbox'
]
eval_keys
,
eval_values
,
eval_cls
=
parse_fetches
(
fetches
,
eval_prog
,
extra_keys
)
...
...
@@ -324,8 +325,8 @@ def main():
exec_strategy
=
exec_strategy
)
if
FLAGS
.
eval
:
compiled_eval_prog
=
fluid
.
CompiledProgram
(
eval_prog
)
train_loader
.
set_sample_list_generator
(
train_reader
,
place
)
# When iterable mode, set set_sample_list_generator(train_reader, place)
train_loader
.
set_sample_list_generator
(
train_reader
)
train_stats
=
TrainingStats
(
cfg
.
log_smooth_window
,
train_keys
)
train_loader
.
start
()
...
...
slim/prune/eval.py
浏览文件 @
0d1721e6
...
...
@@ -78,7 +78,8 @@ def main():
exe
.
run
(
startup_prog
)
reader
=
create_reader
(
cfg
.
EvalReader
)
loader
.
set_sample_list_generator
(
reader
,
place
)
# When iterable mode, set set_sample_list_generator(reader, place)
loader
.
set_sample_list_generator
(
reader
)
dataset
=
cfg
[
'EvalReader'
][
'dataset'
]
...
...
slim/prune/infer.py
浏览文件 @
0d1721e6
...
...
@@ -147,7 +147,8 @@ def main():
logger
.
info
(
"pruned FLOPS: {}"
.
format
(
float
(
base_flops
-
pruned_flops
)
/
base_flops
))
reader
=
create_reader
(
cfg
.
TestReader
,
devices_num
=
1
)
loader
.
set_sample_list_generator
(
reader
,
place
)
# When iterable mode, set set_sample_list_generator(reader, place)
loader
.
set_sample_list_generator
(
reader
)
exe
.
run
(
startup_prog
)
if
cfg
.
weights
:
...
...
slim/prune/prune.py
浏览文件 @
0d1721e6
...
...
@@ -132,7 +132,8 @@ def main():
eval_prog
=
eval_prog
.
clone
(
True
)
eval_reader
=
create_reader
(
cfg
.
EvalReader
)
eval_loader
.
set_sample_list_generator
(
eval_reader
,
place
)
# When iterable mode, set set_sample_list_generator(eval_reader, place)
eval_loader
.
set_sample_list_generator
(
eval_reader
)
# parse eval fetches
extra_keys
=
[]
...
...
slim/quantization/eval.py
浏览文件 @
0d1721e6
...
...
@@ -73,7 +73,8 @@ def main():
eval_prog
=
eval_prog
.
clone
(
True
)
reader
=
create_reader
(
cfg
.
EvalReader
)
loader
.
set_sample_list_generator
(
reader
,
place
)
# When iterable mode, set set_sample_list_generator(reader, place)
loader
.
set_sample_list_generator
(
reader
)
# eval already exists json file
if
FLAGS
.
json_eval
:
...
...
slim/quantization/infer.py
浏览文件 @
0d1721e6
...
...
@@ -75,7 +75,8 @@ def main():
infer_prog
=
infer_prog
.
clone
(
True
)
reader
=
create_reader
(
cfg
.
TestReader
)
loader
.
set_sample_list_generator
(
reader
,
place
)
# When iterable mode, set set_sample_list_generator(reader, place)
loader
.
set_sample_list_generator
(
reader
)
not_quant_pattern
=
[]
if
FLAGS
.
not_quant_pattern
:
not_quant_pattern
=
FLAGS
.
not_quant_pattern
...
...
slim/quantization/train.py
浏览文件 @
0d1721e6
...
...
@@ -129,7 +129,8 @@ def main():
eval_prog
=
eval_prog
.
clone
(
True
)
eval_reader
=
create_reader
(
cfg
.
EvalReader
)
eval_loader
.
set_sample_list_generator
(
eval_reader
,
place
)
# When iterable mode, set set_sample_list_generator(eval_reader, place)
eval_loader
.
set_sample_list_generator
(
eval_reader
)
# parse eval fetches
extra_keys
=
[]
...
...
@@ -210,7 +211,8 @@ def main():
train_reader
=
create_reader
(
cfg
.
TrainReader
,
(
cfg
.
max_iters
-
start_iter
)
*
devices_num
)
train_loader
.
set_sample_list_generator
(
train_reader
,
place
)
# When iterable mode, set set_sample_list_generator(train_reader, place)
train_loader
.
set_sample_list_generator
(
train_reader
)
# whether output bbox is normalized in model output layer
is_bbox_normalized
=
False
...
...
slim/sensitive/sensitive.py
浏览文件 @
0d1721e6
...
...
@@ -84,7 +84,8 @@ def main():
return
eval_reader
=
create_reader
(
cfg
.
EvalReader
)
eval_loader
.
set_sample_list_generator
(
eval_reader
,
place
)
# When iterable mode, set set_sample_list_generator(eval_reader, place)
eval_loader
.
set_sample_list_generator
(
eval_reader
)
# parse eval fetches
extra_keys
=
[]
...
...
tools/eval.py
浏览文件 @
0d1721e6
...
...
@@ -74,7 +74,8 @@ def main():
eval_prog
=
eval_prog
.
clone
(
True
)
reader
=
create_reader
(
cfg
.
EvalReader
,
devices_num
=
1
)
loader
.
set_sample_list_generator
(
reader
,
place
)
# When iterable mode, set set_sample_list_generator(reader, place)
loader
.
set_sample_list_generator
(
reader
)
dataset
=
cfg
[
'EvalReader'
][
'dataset'
]
...
...
tools/infer.py
浏览文件 @
0d1721e6
...
...
@@ -120,7 +120,8 @@ def main():
infer_prog
=
infer_prog
.
clone
(
True
)
reader
=
create_reader
(
cfg
.
TestReader
,
devices_num
=
1
)
loader
.
set_sample_list_generator
(
reader
,
place
)
# When iterable mode, set set_sample_list_generator(reader, place)
loader
.
set_sample_list_generator
(
reader
)
exe
.
run
(
startup_prog
)
if
cfg
.
weights
:
...
...
tools/train.py
浏览文件 @
0d1721e6
...
...
@@ -146,7 +146,8 @@ def main():
eval_prog
=
eval_prog
.
clone
(
True
)
eval_reader
=
create_reader
(
cfg
.
EvalReader
,
devices_num
=
1
)
eval_loader
.
set_sample_list_generator
(
eval_reader
,
place
)
# When iterable mode, set set_sample_list_generator(eval_reader, place)
eval_loader
.
set_sample_list_generator
(
eval_reader
)
# parse eval fetches
extra_keys
=
[]
...
...
@@ -206,7 +207,8 @@ def main():
cfg
,
devices_num
=
devices_num
,
num_trainers
=
num_trainers
)
train_loader
.
set_sample_list_generator
(
train_reader
,
place
)
# When iterable mode, set set_sample_list_generator(train_reader, place)
train_loader
.
set_sample_list_generator
(
train_reader
)
# whether output bbox is normalized in model output layer
is_bbox_normalized
=
False
...
...
tools/train_multi_machine.py
浏览文件 @
0d1721e6
...
...
@@ -162,7 +162,8 @@ def main():
eval_prog
=
eval_prog
.
clone
(
True
)
eval_reader
=
create_reader
(
cfg
.
EvalReader
,
devices_num
=
1
)
eval_loader
.
set_sample_list_generator
(
eval_reader
,
place
)
# When iterable mode, set set_sample_list_generator(eval_reader, place)
eval_loader
.
set_sample_list_generator
(
eval_reader
)
# parse eval fetches
extra_keys
=
[]
...
...
@@ -200,7 +201,8 @@ def main():
cfg
.
TrainReader
,
(
cfg
.
max_iters
-
start_iter
)
*
devices_num
,
cfg
,
devices_num
=
devices_num
)
train_loader
.
set_sample_list_generator
(
train_reader
,
place
)
# When iterable mode, set set_sample_list_generator(train_reader, place)
train_loader
.
set_sample_list_generator
(
train_reader
)
# whether output bbox is normalized in model output layer
is_bbox_normalized
=
False
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录