Skip to content

Commit 74e439f

Browse files
committed
Merge pull request #1166 from dkurt:fix_net_deployment
2 parents dea8d5f + 743f82c commit 74e439f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/dnn/src/dnn.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,10 +604,10 @@ void Net::setBlob(String outputName, const Mat &blob_)
604604

605605
LayerData &ld = impl->layers[pin.lid];
606606
ld.outputBlobs.resize( std::max(pin.oid+1, (int)ld.requiredOutputs.size()) );
607-
MatSize prevShape = ld.outputBlobs[pin.oid].size;
607+
bool oldShape = ld.outputBlobs[pin.oid].size == blob_.size;
608608
ld.outputBlobs[pin.oid] = blob_.clone();
609609

610-
impl->netWasAllocated = impl->netWasAllocated && prevShape == blob_.size;
610+
impl->netWasAllocated = impl->netWasAllocated && oldShape;
611611
}
612612

613613
Mat Net::getBlob(String outputName)

0 commit comments

Comments
 (0)