We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dea8d5f + 743f82c commit 74e439fCopy full SHA for 74e439f
modules/dnn/src/dnn.cpp
@@ -604,10 +604,10 @@ void Net::setBlob(String outputName, const Mat &blob_)
604
605
LayerData &ld = impl->layers[pin.lid];
606
ld.outputBlobs.resize( std::max(pin.oid+1, (int)ld.requiredOutputs.size()) );
607
- MatSize prevShape = ld.outputBlobs[pin.oid].size;
+ bool oldShape = ld.outputBlobs[pin.oid].size == blob_.size;
608
ld.outputBlobs[pin.oid] = blob_.clone();
609
610
- impl->netWasAllocated = impl->netWasAllocated && prevShape == blob_.size;
+ impl->netWasAllocated = impl->netWasAllocated && oldShape;
611
}
612
613
Mat Net::getBlob(String outputName)
0 commit comments