Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
fe350028
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看板
提交
fe350028
编写于
10月 12, 2019
作者:
L
Liufang Sang
提交者:
whs
10月 12, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updata reader api test=develop (#3534)
上级
e7684a4d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
8 deletion
+9
-8
slim/eval.py
slim/eval.py
+1
-1
slim/quantization/compress.py
slim/quantization/compress.py
+7
-6
slim/quantization/freeze.py
slim/quantization/freeze.py
+1
-1
未找到文件。
slim/eval.py
浏览文件 @
fe350028
...
...
@@ -132,7 +132,7 @@ def main():
place
=
fluid
.
CUDAPlace
(
0
)
if
cfg
.
use_gpu
else
fluid
.
CPUPlace
()
exe
=
fluid
.
Executor
(
place
)
eval_pyreader
,
test_feed_vars
=
create_feed
(
eval_feed
,
use_pyreader
=
Fals
e
)
_
,
test_feed_vars
=
create_feed
(
eval_feed
,
iterable
=
Tru
e
)
eval_reader
=
create_reader
(
eval_feed
,
args_path
=
FLAGS
.
dataset_dir
)
#eval_pyreader.decorate_sample_list_generator(eval_reader, place)
...
...
slim/quantization/compress.py
浏览文件 @
fe350028
...
...
@@ -47,7 +47,7 @@ from ppdet.data.data_feed import create_reader
from
ppdet.utils.eval_utils
import
parse_fetches
,
eval_results
from
ppdet.utils.stats
import
TrainingStats
from
ppdet.utils.cli
import
ArgsParser
from
ppdet.utils.check
import
check_gpu
from
ppdet.utils.check
import
check_gpu
,
check_version
import
ppdet.utils.checkpoint
as
checkpoint
from
ppdet.modeling.model_input
import
create_feed
...
...
@@ -118,6 +118,7 @@ def main():
# check if set use_gpu=True in paddlepaddle cpu version
check_gpu
(
cfg
.
use_gpu
)
#check_version()
if
cfg
.
use_gpu
:
devices_num
=
fluid
.
core
.
get_cuda_device_count
()
...
...
@@ -147,7 +148,7 @@ def main():
with
fluid
.
program_guard
(
train_prog
,
startup_prog
):
with
fluid
.
unique_name
.
guard
():
model
=
create
(
main_arch
)
train_
pyreader
,
feed_vars
=
create_feed
(
train_feed
)
train_
loader
,
feed_vars
=
create_feed
(
train_feed
,
iterable
=
True
)
train_fetches
=
model
.
train
(
feed_vars
)
loss
=
train_fetches
[
'loss'
]
lr
=
lr_builder
()
...
...
@@ -157,7 +158,7 @@ def main():
train_reader
=
create_reader
(
train_feed
,
cfg
.
max_iters
*
devices_num
,
FLAGS
.
dataset_dir
)
train_
pyreader
.
decorate
_sample_list_generator
(
train_reader
,
place
)
train_
loader
.
set
_sample_list_generator
(
train_reader
,
place
)
# parse train fetches
train_keys
,
train_values
,
_
=
parse_fetches
(
train_fetches
)
...
...
@@ -172,7 +173,7 @@ def main():
with
fluid
.
program_guard
(
eval_prog
,
startup_prog
):
with
fluid
.
unique_name
.
guard
():
model
=
create
(
main_arch
)
eval_pyreader
,
test_feed_vars
=
create_feed
(
eval_feed
,
use_pyreader
=
Fals
e
)
_
,
test_feed_vars
=
create_feed
(
eval_feed
,
iterable
=
Tru
e
)
fetches
=
model
.
eval
(
test_feed_vars
)
eval_prog
=
eval_prog
.
clone
(
True
)
...
...
@@ -231,8 +232,8 @@ def main():
place
,
fluid
.
global_scope
(),
train_prog
,
train_reader
=
train_
py
reader
,
train_feed_list
=
None
,
train_reader
=
train_reader
,
train_feed_list
=
[(
key
,
value
.
name
)
for
key
,
value
in
feed_vars
.
items
()]
,
train_fetch_list
=
train_fetch_list
,
eval_program
=
eval_prog
,
eval_reader
=
eval_reader
,
...
...
slim/quantization/freeze.py
浏览文件 @
fe350028
...
...
@@ -132,7 +132,7 @@ def main():
place
=
fluid
.
CUDAPlace
(
0
)
if
cfg
.
use_gpu
else
fluid
.
CPUPlace
()
exe
=
fluid
.
Executor
(
place
)
eval_pyreader
,
test_feed_vars
=
create_feed
(
eval_feed
,
use_pyreader
=
Fals
e
)
_
,
test_feed_vars
=
create_feed
(
eval_feed
,
iterable
=
Tru
e
)
eval_reader
=
create_reader
(
eval_feed
,
args_path
=
FLAGS
.
dataset_dir
)
#eval_pyreader.decorate_sample_list_generator(eval_reader, place)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录