Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
1840c165
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1840c165
编写于
11月 28, 2019
作者:
L
Liufang Sang
提交者:
whs
11月 28, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add config file to avoid load checkpoint test=develop (#21373)
上级
e0e205ea
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
51 addition
and
1 deletion
+51
-1
python/paddle/fluid/contrib/slim/tests/quantization/compress_2.yaml
...dle/fluid/contrib/slim/tests/quantization/compress_2.yaml
+50
-0
python/paddle/fluid/contrib/slim/tests/test_reader.py
python/paddle/fluid/contrib/slim/tests/test_reader.py
+1
-1
未找到文件。
python/paddle/fluid/contrib/slim/tests/quantization/compress_2.yaml
0 → 100644
浏览文件 @
1840c165
#start_epoch(int): The epoch to insert quantization operators. default: 0
#
#end_epoch(int): The epoch to save inference model. default: 0
#
#float_model_save_path(str): The path to save model with float weights.
# None means it doesn't save float model. default: None.
#
#mobile_model_save_path(str): The path to save model for paddle-mobile execution.
# None means it doesn't save mobile model. default: None.
#
#int8_model_save_path(str): The path to save model with int8_t weight.
# None means it doesn't save int8 model. default: None.
#
#activation_bits(int): quantization bit number for activation. default: 8.
#
#weight_bits(int): quantization bit number for weights. The bias is not quantized.
# default: 8.
#
#activation_quantize_type(str): quantization type for activation,
# now support 'abs_max', 'range_abs_max' and 'moving_average_abs_max'.
# If use 'abs_max' mode, the quantization scale will be calculated
# dynamically each step in both training and testing period. If use
# 'range_abs_max', a static quantization scale will be calculated
# during training and used in inference.
#
#save_in_nodes(list<str>): A list of variable names used to prune graph
# for saving inference model.
#
#save_out_nodes(list<str>): A list of variable names used to prune graph
# for saving inference model.
version
:
1.0
strategies
:
quantization_strategy
:
class
:
'
QuantizationStrategy'
start_epoch
:
0
end_epoch
:
0
float_model_save_path
:
'
./output/float'
mobile_model_save_path
:
'
./output/mobile'
int8_model_save_path
:
'
./output/int8'
weight_bits
:
8
activation_bits
:
8
weight_quantize_type
:
'
abs_max'
activation_quantize_type
:
'
abs_max'
save_in_nodes
:
[
'
image'
]
save_out_nodes
:
[
'
quan.tmp_2'
]
compressor
:
epoch
:
2
checkpoint_path
:
'
./checkpoints_quan_2/'
strategies
:
-
quantization_strategy
python/paddle/fluid/contrib/slim/tests/test_reader.py
浏览文件 @
1840c165
...
@@ -115,7 +115,7 @@ class TestReader1(TestReader):
...
@@ -115,7 +115,7 @@ class TestReader1(TestReader):
return
loader
return
loader
def
test_compression
(
self
):
def
test_compression
(
self
):
self
.
quan
(
"./quantization/compress_
1
.yaml"
)
self
.
quan
(
"./quantization/compress_
2
.yaml"
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录