mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 11:40:44 +08:00
Fix #12407
This commit is contained in:
parent
0f0a82b619
commit
27a6be8763
@ -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…
Reference in New Issue
Block a user