Use MO as module (#4801)

* Use MO as module

* Add legal notice
This commit is contained in:
Dmitry Kurtaev 2021-03-30 18:11:58 +03:00 committed by GitHub
parent 61f7791b16
commit 47cf3bdc35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 1 deletions

View File

@ -85,7 +85,7 @@ jobs:
wget -q http://download.tensorflow.org/models/mobilenet_v1_2018_08_02/mobilenet_v1_1.0_224.tgz
tar -xf mobilenet_v1_1.0_224.tgz
python3 -m pip install model-optimizer/dist/*.whl
python3 -c "import sys, subprocess, mo_tf; subprocess.run([sys.executable, mo_tf.__file__, '--input_model', 'mobilenet_v1_1.0_224_frozen.pb', '--input_shape', '[1,224,224,3]'], check=True)"
python3 -m mo --input_model mobilenet_v1_1.0_224_frozen.pb --input_shape "[1,224,224,3]"
- uses: actions/upload-artifact@v2
with:

View File

@ -774,6 +774,7 @@ install_prerequisites/protobuf-3.6.1-py3.6-win-amd64.egg
install_prerequisites/protobuf-3.6.1-py3.7-win-amd64.egg
mo.py
mo/__init__.py
mo/__main__.py
mo/back/__init__.py
mo/back/ie_ir_ver_2/__init__.py
mo/back/ie_ir_ver_2/emitter.py

View File

@ -0,0 +1,29 @@
"""
Copyright (C) 2018-2021 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import sys
from mo.utils.versions_checker import check_python_version # pylint: disable=no-name-in-module
ret_code = check_python_version()
if ret_code:
sys.exit(ret_code)
from mo.main import main
from mo.utils.cli_parser import get_all_cli_parser # pylint: disable=no-name-in-module
sys.exit(main(get_all_cli_parser(), None))