Skip to content

Commit b46f5b1

Browse files
committed
Align convolutional layer weights separately from origin ones
1 parent 20f603a commit b46f5b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/dnn/src/layers/convolution_layer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ class ConvolutionLayerImpl : public BaseConvolutionLayerImpl
638638
{
639639
// prepare weightsMat where each row is aligned and has enough zero padding on the right to
640640
// use vectorized (i.e. with intrinsics) loops without tail processing
641-
Mat wm = blobs[0].reshape(1, outCn);
641+
Mat wm = blobs[0].reshape(1, outCn).clone();
642642
if( wm.step1() % VEC_ALIGN != 0 )
643643
{
644644
int newcols = (int)alignSize(wm.step1(), VEC_ALIGN);

0 commit comments

Comments
 (0)