Skip to content

Commit e813a1f

Browse files
author
Julia Kamelina
authored
align mo_dir to point to mo folder (#3026)
1 parent a1645e0 commit e813a1f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/model_tools/src/openvino/model_zoo/omz_converter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def convert(reporter, model, output_dir, args, mo_props, requested_precisions):
9292
model_format = model.framework
9393
mo_extension_dir = mo_props.base_dir / 'extensions'
9494
if not mo_extension_dir.exists():
95-
mo_extension_dir = mo_props.base_dir / 'mo'
95+
mo_extension_dir = mo_props.base_dir
9696

9797
template_variables = {
9898
'config_dir': _common.MODEL_ROOT / model.subdirectory,
@@ -232,11 +232,12 @@ def main():
232232
mo_dir = mo_path.parent
233233
else:
234234
mo_package_path, stderr = _common.get_package_path(args.python, 'openvino.tools.mo')
235+
mo_dir = mo_package_path
235236
if mo_package_path is None:
236237
mo_package_path, stderr = _common.get_package_path(args.python, 'mo')
238+
mo_dir = mo_package_path.parent
237239
if mo_package_path is None:
238240
sys.exit('Unable to load Model Optimizer. Errors occurred: {}'.format(stderr))
239-
mo_dir = mo_package_path.parent
240241

241242
output_dir = args.download_dir if args.output_dir is None else args.output_dir
242243

0 commit comments

Comments
 (0)