mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 01:13:28 +08:00
remove flag of convolution
This commit is contained in:
parent
233478e689
commit
91b6c8507a
@ -258,7 +258,6 @@ CV__DNN_INLINE_NS_BEGIN
|
||||
static Ptr<BaseConvolutionLayer> create(const LayerParams& params);
|
||||
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.
|
||||
};
|
||||
|
||||
|
@ -116,9 +116,6 @@ public:
|
||||
|
||||
fusedWeights = false;
|
||||
fusedBias = false;
|
||||
|
||||
if (kernel_size.size() == 2)
|
||||
isConv2D = true;
|
||||
}
|
||||
|
||||
virtual void finalize(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr) CV_OVERRIDE
|
||||
|
@ -170,8 +170,8 @@ void Net::Impl::fuseLayers(const std::vector<LayerPin>& blobsToKeep_)
|
||||
// To avoid the order like: conv + activ + add, if we found the conv has been fused with activ, we break.
|
||||
Ptr<ConvolutionLayer> convLayer = ld.layerInstance.dynamicCast<ConvolutionLayer>();
|
||||
|
||||
// Only Conv2D without fusion Activation supports this fusion, other-wise, we skip.
|
||||
if (!convLayer->isConv2D || convLayer->fusedActivation)
|
||||
// Only Convolution layer without fusion Activation supports this fusion, other-wise, we skip.
|
||||
if (convLayer->fusedActivation)
|
||||
break;
|
||||
|
||||
// For now, there are currently two layers in OpenCV that run the Add operator.
|
||||
|
Loading…
Reference in New Issue
Block a user