|
|
|
@@ -35,6 +35,8 @@ from mindinsight.mindconverter.common.exceptions import GraphInitError, TreeCrea |
|
|
|
BadParamError |
|
|
|
from mindinsight.mindconverter.graph_based_converter.third_party_graph import GraphFactory |
|
|
|
|
|
|
|
from google.protobuf.internal import api_implementation |
|
|
|
|
|
|
|
check_common_dependency_integrity = partial(check_dependency_integrity, |
|
|
|
"onnx", "onnxruntime", "onnxoptimizer") |
|
|
|
|
|
|
|
@@ -262,6 +264,11 @@ def main_graph_base_converter(file_config): |
|
|
|
Args: |
|
|
|
file_config (dict): The config of file which to convert. |
|
|
|
""" |
|
|
|
if api_implementation.Type() != 'cpp' \ |
|
|
|
or os.getenv('PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION') != 'cpp': |
|
|
|
log_console.warning("Protobuf is currently implemented in \"Python\". \ |
|
|
|
The conversion process may take a long time. \ |
|
|
|
Please use the \"C++\" backend version") |
|
|
|
graph_path = file_config['model_file'] |
|
|
|
frame_type = get_framework_type(graph_path) |
|
|
|
if not file_config.get("shape"): |
|
|
|
|