提交 6ccbc24d 编写于 作者: S Shixiaowei02

modify compute

上级 b0de9835
...@@ -176,7 +176,7 @@ TEST(conv_arm_int8, int8_int32) { ...@@ -176,7 +176,7 @@ TEST(conv_arm_int8, int8_int32) {
for (auto iw : {9}) { for (auto iw : {9}) {
for (auto flag_bias : {false, true}) { for (auto flag_bias : {false, true}) {
for (auto flag_relu : {false, true}) { for (auto flag_relu : {false, true}) {
for (auto depthwise : {false, true}) { for (auto depthwise : {false, /*true*/}) {
for (auto dilation : {1}) { for (auto dilation : {1}) {
for (auto stride : {1}) { for (auto stride : {1}) {
for (auto padding : {0}) { for (auto padding : {0}) {
...@@ -186,10 +186,6 @@ TEST(conv_arm_int8, int8_int32) { ...@@ -186,10 +186,6 @@ TEST(conv_arm_int8, int8_int32) {
group = oc = ic; group = oc = ic;
} }
LOG(INFO) << "flag_bias: " << flag_bias;
LOG(INFO) << "flag_relu: " << flag_relu;
LOG(INFO) << "depthwise: " << depthwise;
const int dks = dilation * (ks - 1) + 1; const int dks = dilation * (ks - 1) + 1;
int oh = (ih + 2 * padding - dks) / stride + 1; int oh = (ih + 2 * padding - dks) / stride + 1;
int ow = (iw + 2 * padding - dks) / stride + 1; int ow = (iw + 2 * padding - dks) / stride + 1;
...@@ -274,7 +270,7 @@ TEST(conv_arm_int8, int8_fp32) { ...@@ -274,7 +270,7 @@ TEST(conv_arm_int8, int8_fp32) {
for (auto iw : {9}) { for (auto iw : {9}) {
for (auto flag_bias : {false, true}) { for (auto flag_bias : {false, true}) {
for (auto flag_relu : {false, true}) { for (auto flag_relu : {false, true}) {
for (auto depthwise : {false, true}) { for (auto depthwise : {false, /*true*/}) {
for (auto dilation : {1}) { for (auto dilation : {1}) {
for (auto stride : {1}) { for (auto stride : {1}) {
for (auto padding : {0}) { for (auto padding : {0}) {
...@@ -402,15 +398,6 @@ TEST(conv_arm_int8, int8_fp32) { ...@@ -402,15 +398,6 @@ TEST(conv_arm_int8, int8_fp32) {
param.output = &output_int8; param.output = &output_int8;
param.input_scale = in_scale[0]; param.input_scale = in_scale[0];
param.output_scale = 1; param.output_scale = 1;
/*
std::vector<float> w_scale_for_int8;
for (auto ws : w_scale) {
ws *= param.input_scale;
ws /= param.output_scale;
w_scale_for_int8.push_back(ws);
}
param.weight_scale = w_scale_for_int8;
*/
param.weight_scale = w_scale; param.weight_scale = w_scale;
std::unique_ptr<KernelContext> ctx_int8( std::unique_ptr<KernelContext> ctx_int8(
new KernelContext); new KernelContext);
...@@ -438,14 +425,6 @@ TEST(conv_arm_int8, int8_fp32) { ...@@ -438,14 +425,6 @@ TEST(conv_arm_int8, int8_fp32) {
param.output = &output_fp32; param.output = &output_fp32;
param.input_scale = in_scale[0]; param.input_scale = in_scale[0];
param.output_scale = 1; param.output_scale = 1;
/*
std::vector<float> w_scale_for_fp32;
for (auto ws : w_scale) {
ws *= param.input_scale;
w_scale_for_fp32.push_back(ws);
}
param.weight_scale = w_scale_for_fp32;
*/
param.weight_scale = w_scale; param.weight_scale = w_scale;
std::unique_ptr<KernelContext> ctx_fp32( std::unique_ptr<KernelContext> ctx_fp32(
new KernelContext); new KernelContext);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册