Merge pull request #20453 from rogday:onnx_importer_fix

Split layer dispatch into functions in ONNXImporter

* split layer dispatch into functions

* fixes

* identation and comment fixes

* fix constness
pull/20479/head^2
rogday 4 years ago committed by GitHub
parent d83901e665
commit cff0168f3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      modules/dnn/src/dnn_common.hpp
  2. 2922
      modules/dnn/src/onnx/onnx_importer.cpp
  3. 2
      modules/dnn/src/tensorflow/tf_importer.cpp

@ -14,6 +14,7 @@ Mutex& getInitializationMutex();
void initializeLayerFactory();
namespace detail {
#define CALL_MEMBER_FN(object, ptrToMemFn) ((object).*(ptrToMemFn))
struct NetImplBase
{

File diff suppressed because it is too large Load Diff

@ -2869,7 +2869,7 @@ void TFImporter::parseNode(const tensorflow::NodeDef& layer)
DispatchMap::const_iterator iter = dispatch.find(type);
if (iter != dispatch.end())
{
((*this).*(iter->second))(net, layer, layerParams);
CALL_MEMBER_FN(*this, iter->second)(net, layer, layerParams);
}
else
{

Loading…
Cancel
Save