diff --git a/src/layer/innerproduct.cpp b/src/layer/innerproduct.cpp index bf77ed239..7fbe1bc27 100644 --- a/src/layer/innerproduct.cpp +++ b/src/layer/innerproduct.cpp @@ -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(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)