|
|
|
@@ -40,7 +40,12 @@ static int test_convolution(int w, int h, int c, int outch, int kernel, int dila |
|
|
|
if (bias) |
|
|
|
weights[1] = RandomMat(outch); |
|
|
|
|
|
|
|
int ret = test_layer<ncnn::Convolution>("Convolution", pd, weights, a); |
|
|
|
float epsilon = 0.001; |
|
|
|
// larget epsilon for winograd optimization |
|
|
|
if (kernel == 3 && dilation == 1 && stride == 1 && c >= 16 && outch >= 16) |
|
|
|
epsilon = 0.002; |
|
|
|
|
|
|
|
int ret = test_layer<ncnn::Convolution>("Convolution", pd, weights, a, epsilon); |
|
|
|
if (ret != 0) |
|
|
|
{ |
|
|
|
fprintf(stderr, "test_convolution failed w=%d h=%d c=%d outch=%d kernel=%d dilation=%d stride=%d pad=%d bias=%d act=%d actparams=[%f,%f]\n", w, h, c, outch, kernel, dilation, stride, pad, bias, activation_type, activation_params[0], activation_params[1]); |
|
|
|
|