mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
another round of dnn optimization (#9011)
* another round of dnn optimization: * increased malloc alignment across OpenCV from 16 to 64 bytes to make it AVX2 and even AVX-512 friendly * improved SIMD optimization of pooling layer, optimized average pooling * cleaned up convolution layer implementation * made activation layer "attacheable" to all other layers, including fully connected and addition layer. * fixed bug in the fusion algorithm: "LayerData::consumers" should not be cleared, because it desctibes the topology. * greatly optimized permutation layer, which improved SSD performance * parallelized element-wise binary/ternary/... ops (sum, prod, max) * also, added missing copyrights to many of the layer implementation files * temporarily disabled (again) the check for intermediate blobs consistency; fixed warnings from various builders
This commit is contained in:
@@ -135,7 +135,7 @@ void ConvolveBuf::create(Size image_size, Size templ_size)
|
||||
const double blockScale = 4.5;
|
||||
const int minBlockSize = 256;
|
||||
|
||||
block_size.width = cvRound(result_size.width*blockScale);
|
||||
block_size.width = cvRound(templ_size.width*blockScale);
|
||||
block_size.width = std::max( block_size.width, minBlockSize - templ_size.width + 1 );
|
||||
block_size.width = std::min( block_size.width, result_size.width );
|
||||
block_size.height = cvRound(templ_size.height*blockScale);
|
||||
|
||||
Reference in New Issue
Block a user