add enableWinograd API for Net.
This commit is contained in:
@@ -259,6 +259,7 @@ CV__DNN_INLINE_NS_BEGIN
|
||||
bool fusedActivation = false;
|
||||
bool fusedAdd = false;
|
||||
bool isConv2D = false; // Should be deleted after fastconv branch support Conv1D and Conv3D.
|
||||
bool useWinograd = false; // Flag whether to use Winograd to speed up 3x3 convolution.
|
||||
};
|
||||
|
||||
class CV_EXPORTS ConvolutionLayerInt8 : public BaseConvolutionLayer
|
||||
@@ -270,6 +271,7 @@ CV__DNN_INLINE_NS_BEGIN
|
||||
// quantization type flag. The perChannel default is true, that means it contains the parameters
|
||||
// of per-Channel quantization. Otherwise, that means this layer contains per-Tensor quantized parameters.
|
||||
bool per_channel;
|
||||
bool useWinograd = true; // Flag whether to use Winograd to speed up 3x3 convolution.
|
||||
static Ptr<BaseConvolutionLayer> create(const LayerParams& params);
|
||||
};
|
||||
|
||||
|
||||
@@ -837,6 +837,12 @@ CV__DNN_INLINE_NS_BEGIN
|
||||
*/
|
||||
CV_WRAP void enableFusion(bool fusion);
|
||||
|
||||
/** @brief Enables or disables the Winograd compute branch. The Winograd compute branch can speed up
|
||||
* 3x3 Convolution at a small loss of accuracy.
|
||||
* @param useWinograd true to enable the Winograd compute branch. The default is true.
|
||||
*/
|
||||
CV_WRAP void enableWinograd(bool useWinograd);
|
||||
|
||||
/** @brief Returns overall time for inference and timings (in ticks) for layers.
|
||||
*
|
||||
* Indexes in returned vector correspond to layers ids. Some layers can be fused with others,
|
||||
|
||||
Reference in New Issue
Block a user