|
|
|
@@ -262,18 +262,17 @@ int InnerProduct::forward_int8(const Mat& bottom_blob, Mat& top_blob, const Opti |
|
|
|
for (int j = 0; j < h; j++) |
|
|
|
{ |
|
|
|
const signed char* m = bottom_blob_int8.row<signed char>(j); |
|
|
|
const signed char* kptr = weight_data; |
|
|
|
float* outptr = top_blob.row(j); |
|
|
|
|
|
|
|
for (int p = 0; p < num_output; p++) |
|
|
|
{ |
|
|
|
const signed char* kptr = (const signed char*)weight_data + w * p; |
|
|
|
int sum = 0; |
|
|
|
|
|
|
|
for (int i = 0; i < w; i++) |
|
|
|
{ |
|
|
|
sum += m[i] * kptr[i]; |
|
|
|
} |
|
|
|
|
|
|
|
// dequantize and relu |
|
|
|
float scale_in; |
|
|
|
if (weight_data_int8_scales[p] == 0) |
|
|
|
|