Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
c2a14556
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
331
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c2a14556
编写于
8月 16, 2018
作者:
H
hanbuhe
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
merge fc commit
上级
2e29d186
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
10 addition
and
10 deletion
+10
-10
src/fpga/quantization.cpp
src/fpga/quantization.cpp
+1
-1
src/fpga/quantization.h
src/fpga/quantization.h
+1
-1
src/operators/kernel/fpga/conv_add_bn_kernel.cpp
src/operators/kernel/fpga/conv_add_bn_kernel.cpp
+1
-1
src/operators/kernel/fpga/conv_add_bn_relu_kernel.cpp
src/operators/kernel/fpga/conv_add_bn_relu_kernel.cpp
+1
-1
src/operators/kernel/fpga/conv_add_relu_kernel.cpp
src/operators/kernel/fpga/conv_add_relu_kernel.cpp
+1
-1
src/operators/kernel/fpga/conv_bn_kernel.cpp
src/operators/kernel/fpga/conv_bn_kernel.cpp
+1
-1
src/operators/kernel/fpga/conv_bn_relu_kernel.cpp
src/operators/kernel/fpga/conv_bn_relu_kernel.cpp
+1
-1
src/operators/kernel/fpga/fc_relu_kernel.cpp
src/operators/kernel/fpga/fc_relu_kernel.cpp
+1
-1
src/operators/kernel/fpga/fusion_fc_kernel.cpp
src/operators/kernel/fpga/fusion_fc_kernel.cpp
+2
-2
未找到文件。
src/fpga/quantization.cpp
浏览文件 @
c2a14556
...
@@ -47,7 +47,7 @@ static Dtype find_max(Dtype* data, int64_t num) {
...
@@ -47,7 +47,7 @@ static Dtype find_max(Dtype* data, int64_t num) {
}
}
// template <typename Dtype>
// template <typename Dtype>
void
quanti
fy_filter
(
framework
::
Tensor
*
filter
)
{
void
quanti
ze_filter
(
framework
::
Tensor
*
filter
)
{
DLOG
<<
"quantilize_filter........"
;
DLOG
<<
"quantilize_filter........"
;
float
scale
=
0
;
float
scale
=
0
;
...
...
src/fpga/quantization.h
浏览文件 @
c2a14556
...
@@ -24,7 +24,7 @@ template <typename Dtype>
...
@@ -24,7 +24,7 @@ template <typename Dtype>
static
void
chw_to_hwc
(
Dtype
*
data_in
,
Dtype
*
data_out
,
int64_t
num
,
static
void
chw_to_hwc
(
Dtype
*
data_in
,
Dtype
*
data_out
,
int64_t
num
,
int64_t
channel
,
int64_t
height
,
int64_t
width
);
int64_t
channel
,
int64_t
height
,
int64_t
width
);
void
quanti
fy_filter
(
framework
::
Tensor
*
filter
);
void
quanti
ze_filter
(
framework
::
Tensor
*
filter
);
}
// namespace fpga
}
// namespace fpga
}
// namespace paddle_mobile
}
// namespace paddle_mobile
src/operators/kernel/fpga/conv_add_bn_kernel.cpp
浏览文件 @
c2a14556
...
@@ -60,7 +60,7 @@ bool ConvAddBNKernel<FPGA, float>::Init(FusionConvAddBNParam *param) {
...
@@ -60,7 +60,7 @@ bool ConvAddBNKernel<FPGA, float>::Init(FusionConvAddBNParam *param) {
param
->
SetNewScale
(
new_scale
);
param
->
SetNewScale
(
new_scale
);
param
->
SetNewBias
(
new_bias
);
param
->
SetNewBias
(
new_bias
);
fpga
::
quantify
_filter
(
filter
);
fpga
::
quantize
_filter
(
filter
);
auto
filter_ptr
=
filter
->
data
<
int8_t
>
();
auto
filter_ptr
=
filter
->
data
<
int8_t
>
();
fpga
::
ConvArgs
convArgs
;
fpga
::
ConvArgs
convArgs
;
...
...
src/operators/kernel/fpga/conv_add_bn_relu_kernel.cpp
浏览文件 @
c2a14556
...
@@ -56,7 +56,7 @@ bool ConvAddBNReluKernel<FPGA, float>::Init(FusionConvAddBNReluParam *param) {
...
@@ -56,7 +56,7 @@ bool ConvAddBNReluKernel<FPGA, float>::Init(FusionConvAddBNReluParam *param) {
}
}
param
->
SetNewScale
(
new_scale
);
param
->
SetNewScale
(
new_scale
);
param
->
SetNewBias
(
new_bias
);
param
->
SetNewBias
(
new_bias
);
fpga
::
quantify
_filter
(
filter
);
fpga
::
quantize
_filter
(
filter
);
auto
filter_ptr
=
filter
->
data
<
int8_t
>
();
auto
filter_ptr
=
filter
->
data
<
int8_t
>
();
fpga
::
ConvArgs
convArgs
;
fpga
::
ConvArgs
convArgs
;
...
...
src/operators/kernel/fpga/conv_add_relu_kernel.cpp
浏览文件 @
c2a14556
...
@@ -40,7 +40,7 @@ bool ConvAddReluKernel<FPGA, float>::Init(FusionConvAddReluParam *param) {
...
@@ -40,7 +40,7 @@ bool ConvAddReluKernel<FPGA, float>::Init(FusionConvAddReluParam *param) {
bs_ptr
[
i
*
2
+
1
]
=
bias_ptr
[
i
];
bs_ptr
[
i
*
2
+
1
]
=
bias_ptr
[
i
];
}
}
fpga
::
quantify
_filter
(
filter
);
fpga
::
quantize
_filter
(
filter
);
auto
filter_ptr
=
filter
->
data
<
int8_t
>
();
auto
filter_ptr
=
filter
->
data
<
int8_t
>
();
fpga
::
ConvArgs
convArgs
;
fpga
::
ConvArgs
convArgs
;
...
...
src/operators/kernel/fpga/conv_bn_kernel.cpp
浏览文件 @
c2a14556
...
@@ -55,7 +55,7 @@ bool ConvBNKernel<FPGA, float>::Init(FusionConvBNParam *param) {
...
@@ -55,7 +55,7 @@ bool ConvBNKernel<FPGA, float>::Init(FusionConvBNParam *param) {
}
}
param
->
SetNewScale
(
new_scale
);
param
->
SetNewScale
(
new_scale
);
param
->
SetNewBias
(
new_bias
);
param
->
SetNewBias
(
new_bias
);
fpga
::
quantify
_filter
(
filter
);
fpga
::
quantize
_filter
(
filter
);
auto
filter_ptr
=
filter
->
data
<
int8_t
>
();
auto
filter_ptr
=
filter
->
data
<
int8_t
>
();
fpga
::
ConvArgs
convArgs
;
fpga
::
ConvArgs
convArgs
;
...
...
src/operators/kernel/fpga/conv_bn_relu_kernel.cpp
浏览文件 @
c2a14556
...
@@ -52,7 +52,7 @@ bool ConvBNReluKernel<FPGA, float>::Init(FusionConvBNReluParam *param) {
...
@@ -52,7 +52,7 @@ bool ConvBNReluKernel<FPGA, float>::Init(FusionConvBNReluParam *param) {
}
}
param
->
SetNewScale
(
new_scale
);
param
->
SetNewScale
(
new_scale
);
param
->
SetNewBias
(
new_bias
);
param
->
SetNewBias
(
new_bias
);
fpga
::
quantify
_filter
(
filter
);
fpga
::
quantize
_filter
(
filter
);
auto
filter_ptr
=
filter
->
data
<
int8_t
>
();
auto
filter_ptr
=
filter
->
data
<
int8_t
>
();
fpga
::
ConvArgs
convArgs
;
fpga
::
ConvArgs
convArgs
;
...
...
src/operators/kernel/fpga/fc_relu_kernel.cpp
浏览文件 @
c2a14556
...
@@ -40,7 +40,7 @@ bool FusionFcReluKernel<FPGA, float>::Init(FusionFcReluParam *param) {
...
@@ -40,7 +40,7 @@ bool FusionFcReluKernel<FPGA, float>::Init(FusionFcReluParam *param) {
bs_ptr
[
i
*
2
+
1
]
=
input_z_ptr
[
i
];
bs_ptr
[
i
*
2
+
1
]
=
input_z_ptr
[
i
];
}
}
fpga
::
quantify
_filter
(
input_y
);
fpga
::
quantize
_filter
(
input_y
);
auto
input_y_ptr
=
input_y
->
data
<
int8_t
>
();
auto
input_y_ptr
=
input_y
->
data
<
int8_t
>
();
fpga
::
ConvArgs
convArgs
;
fpga
::
ConvArgs
convArgs
;
...
...
src/operators/kernel/fpga/fusion_fc_kernel.cpp
浏览文件 @
c2a14556
...
@@ -14,7 +14,7 @@ limitations under the License. */
...
@@ -14,7 +14,7 @@ limitations under the License. */
#ifdef FUSION_FC_OP
#ifdef FUSION_FC_OP
#include "operators/kernel/fusion_fc_kernel.h"
#include "operators/kernel/fusion_fc_kernel.h"
#include "fpga/
fpga_quantil
ization.h"
#include "fpga/
quant
ization.h"
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
operators
{
namespace
operators
{
...
@@ -39,7 +39,7 @@ bool FusionFcKernel<FPGA, float>::Init(FusionFcParam *param) {
...
@@ -39,7 +39,7 @@ bool FusionFcKernel<FPGA, float>::Init(FusionFcParam *param) {
bs_ptr
[
i
*
2
+
1
]
=
input_z_ptr
[
i
];
bs_ptr
[
i
*
2
+
1
]
=
input_z_ptr
[
i
];
}
}
fpga
::
quanti
fy
_filter
(
input_y
);
fpga
::
quanti
ze
_filter
(
input_y
);
auto
input_y_ptr
=
input_y
->
data
<
int8_t
>
();
auto
input_y_ptr
=
input_y
->
data
<
int8_t
>
();
fpga
::
ConvArgs
convArgs
;
fpga
::
ConvArgs
convArgs
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录