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
This commit is contained in:
rogday 2021-07-28 18:06:24 +03:00 committed by GitHub
parent d83901e665
commit cff0168f3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1724 additions and 1517 deletions

View File

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

View File

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