Skip to content

Commit

Permalink
fix test int8 winograd43
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Jan 3, 2024
1 parent 624d46d commit 3851f79
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_convolution_3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ static int test_convolution_int8(int w, int h, int c, int outch, int kernel, int
ncnn::Mat weight_scales = scales_mat(weights[0], outch, c * kernel * kernel, c * kernel * kernel);
ncnn::Mat input_scales = scales_mat(a, 1, w * h * c, a.cstep);
ncnn::Mat top_scales = requant ? scales_mat(a, 1, w * h * c, a.cstep) : ncnn::Mat();

if (kernel == 3 && dilation == 1 && stride == 1)
{
// test for 6bit quant
for (int i = 0; i < weight_scales.w; i++)
weight_scales[i] = weight_scales[i] / 4.f;
}

if (bias)
{
weights[1] = RandomMat(outch);
Expand Down

0 comments on commit 3851f79

Please sign in to comment.