pull/12409/head
Dmitry Kurtaev 6 years ago
parent 0f0a82b619
commit 27a6be8763
  1. 5
      modules/dnn/src/dnn.cpp

@ -2692,8 +2692,7 @@ void Net::setInput(InputArray blob, const String& name, double scalefactor, cons
Mat Net::getParam(LayerId layer, int numParam)
{
LayerData &ld = impl->getLayerData(layer);
std::vector<Mat> &layerBlobs = ld.layerInstance->blobs;
std::vector<Mat> &layerBlobs = ld.getLayerInstance()->blobs;
CV_Assert(numParam < (int)layerBlobs.size());
return layerBlobs[numParam];
}
@ -2702,7 +2701,7 @@ void Net::setParam(LayerId layer, int numParam, const Mat &blob)
{
LayerData &ld = impl->getLayerData(layer);
std::vector<Mat> &layerBlobs = ld.layerInstance->blobs;
std::vector<Mat> &layerBlobs = ld.getLayerInstance()->blobs;
CV_Assert(numParam < (int)layerBlobs.size());
//we don't make strong checks, use this function carefully
layerBlobs[numParam] = blob;

Loading…
Cancel
Save