Skip to content

Commit

Permalink
Update dnn.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanxi Guo committed Aug 26, 2021
1 parent 9bd5505 commit 4645adc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions modules/dnn/src/dnn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4976,9 +4976,7 @@ void Net::setInput(InputArray blob, const String& name, double scalefactor, cons
MatShape prevShape = shape(impl->netInputLayer->inputsData[pin.oid]);
bool oldShape = prevShape == blobShape;

// blob_.copyTo(impl->netInputLayer->inputsData[pin.oid]);
impl->netInputLayer->inputsData.emplace(impl->netInputLayer->inputsData.begin()+pin.oid, blob_);
impl->netInputLayer->inputsData.erase(impl->netInputLayer->inputsData.begin()+pin.oid+1);
blob_.copyTo(impl->nPetInputLayer->inputsData[pin.oid]);
if (!oldShape) {
ld.outputBlobs[pin.oid] = impl->netInputLayer->inputsData[pin.oid];
if (impl->hasDynamicShapes)
Expand Down

0 comments on commit 4645adc

Please sign in to comment.