System information (version)
Detailed description
|
if (!activ_power.empty()) |
|
{ |
|
if (activ_power->scale != 1.f || activ_power->shift != 0.f) |
|
{ |
|
const int outCh = blobs[0].size[0]; |
|
fuseWeights(Mat(1, outCh, CV_32F, Scalar(activ_power->scale)), |
|
Mat(1, outCh, CV_32F, Scalar(activ_power->shift))); |
|
} |
|
|
|
power = activ_power->power; |
|
activType = OCL4DNN_CONV_FUSED_ACTIV_POWER; |
|
} |
fusedWeights and fusedBias are not updated after fusion. Same with CUDA. Here is tryFuse for reference on how it should have been:
|
if (!w.empty() || !b.empty()) |
|
{ |
|
fuseWeights(w, b); |
|
fusedWeights = fusedWeights || !w.empty(); |
|
fusedBias = fusedBias || (hasBias() && !w.empty()) || !b.empty(); |
|
return true; |
|
} |
Steps to reproduce
Disabled tests from #17976 can reproduce this bug. Relevant tests have // bug: https://github.com/opencv/opencv/issues/17964 comment just before applying the skip test tag.
Issue submission checklist
System information (version)
Detailed description
opencv/modules/dnn/src/layers/convolution_layer.cpp
Lines 409 to 420 in b698d0a
fusedWeightsandfusedBiasare not updated after fusion. Same with CUDA. Here istryFusefor reference on how it should have been:opencv/modules/dnn/src/layers/convolution_layer.cpp
Lines 176 to 182 in b698d0a
Steps to reproduce
Disabled tests from #17976 can reproduce this bug. Relevant tests have
// bug: https://github.com/opencv/opencv/issues/17964comment just before applying the skip test tag.Issue submission checklist
answers.opencv.org, Stack Overflow, etc and have not found solution