diff --git a/inference-engine/src/offline_transformations/src/moc_transformations.cpp b/inference-engine/src/offline_transformations/src/moc_transformations.cpp index eec2491a28edbf..35f4a575c15c74 100644 --- a/inference-engine/src/offline_transformations/src/moc_transformations.cpp +++ b/inference-engine/src/offline_transformations/src/moc_transformations.cpp @@ -5,10 +5,16 @@ #include #include "moc_transformations.hpp" +#include "pruning.hpp" +#include NGRAPH_RTTI_DEFINITION(ngraph::pass::MOCTransformations, "MOCTransformations", 0); -bool ngraph::pass::MOCTransformations::run_on_function(std::shared_ptr) { +bool ngraph::pass::MOCTransformations::run_on_function(std::shared_ptr f) { + ngraph::pass::Manager m(get_pass_config()); + m.register_pass(); + m.run_passes(f); + return false; } \ No newline at end of file diff --git a/model-optimizer/mo/back/offline_transformations.py b/model-optimizer/mo/back/offline_transformations.py index ee8905356acd1a..a363a1ca250756 100644 --- a/model-optimizer/mo/back/offline_transformations.py +++ b/model-optimizer/mo/back/offline_transformations.py @@ -35,6 +35,7 @@ def apply_offline_transformations(input_model: str, framework: str, transforms: available_transformations[name](net, **args) + ApplyMOCTransformations(net, False) net.serialize(input_model + ".xml", input_model + ".bin") path_to_mapping = input_model + ".mapping" GenerateMappingFile(net, path_to_mapping.encode('utf-8'), extract_names)