|
|
|
@ -383,7 +383,7 @@ int Net::addLayer(const String &name, const String &type, LayerParams ¶ms) |
|
|
|
|
{ |
|
|
|
|
if (name.find('.') != String::npos) |
|
|
|
|
{ |
|
|
|
|
CV_Error(Error::StsBadArg, "Added layer name \"" + name + "\" should not contain dot symbol"); |
|
|
|
|
CV_Error(Error::StsBadArg, "Added layer name \"" + name + "\" must not contain dot symbol"); |
|
|
|
|
return -1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -400,6 +400,14 @@ int Net::addLayer(const String &name, const String &type, LayerParams ¶ms) |
|
|
|
|
return id; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int Net::addLayerToPrev(const String &name, const String &type, LayerParams ¶ms) |
|
|
|
|
{ |
|
|
|
|
int prvLid = impl->lastLayerId; |
|
|
|
|
int newLid = this->addLayer(name, type, params); |
|
|
|
|
this->connect(prvLid, 0, newLid, 0); |
|
|
|
|
return newLid; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Net::connect(int outLayerId, int outNum, int inLayerId, int inNum) |
|
|
|
|
{ |
|
|
|
|
impl->connect(outLayerId, outNum, inLayerId, inNum); |
|
|
|
@ -467,6 +475,18 @@ Blob Net::getParam(LayerId layer, int numParam) |
|
|
|
|
return layerBlobs[numParam]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int Net::getLayerId(const String &layer) |
|
|
|
|
{ |
|
|
|
|
return impl->getLayerId(layer); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Net::deleteLayer(LayerId) |
|
|
|
|
{ |
|
|
|
|
CV_Error(Error::StsNotImplemented, ""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
Importer::~Importer() |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
@ -530,16 +550,5 @@ Ptr<Layer> LayerRegister::createLayerInstance(const String &_type, LayerParams& |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int Net::getLayerId(LayerId) |
|
|
|
|
{ |
|
|
|
|
CV_Error(Error::StsNotImplemented, ""); |
|
|
|
|
return -1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Net::deleteLayer(LayerId) |
|
|
|
|
{ |
|
|
|
|
CV_Error(Error::StsNotImplemented, ""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|