This commit is contained in:
Dmitry Kurtaev 2018-09-04 17:48:52 +03:00
parent 0f0a82b619
commit 27a6be8763

View File

@ -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;