- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to convert the BERT model based on this documentation ...
rlo@rlo-mac01 Desktop % python3 /opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/mo.py --input_model ~/Downloads/model.onnx
Model Optimizer arguments:
Common parameters:
- Path to the Input Model: /Users/rlo/Downloads/model.onnx
- Path for generated IR: /Users/rlo/Desktop/.
- IR output name: model
- Log level: ERROR
- Batch: Not specified, inherited from the model
- Input layers: Not specified, inherited from the model
- Output layers: Not specified, inherited from the model
- Input shapes: Not specified, inherited from the model
- Mean values: Not specified
- Scale values: Not specified
- Scale factor: Not specified
- Precision of IR: FP32
- Enable fusing: True
- Enable grouped convolutions fusing: True
- Move mean values to preprocess section: None
- Reverse input channels: False
ONNX specific parameters:
Model Optimizer version: 2021.1.0-1237-bece22ac675-releases/2021/1
[libprotobuf ERROR google/protobuf/descriptor_database.cc:394] Invalid file descriptor data passed to EncodedDescriptorDatabase::Add().
[libprotobuf FATAL google/protobuf/descriptor.cc:1356] CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size):
libc++abi.dylib: terminating with uncaught exception of type google::protobuf::FatalException: CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size):
zsh: abort python3 /opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/mo.py
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok I made some progress, and apparently I have to uninstall tensorflow ...
pip3 uninstall tensorflow
I'm on Mac OSX 10.15.7 and Python 3.7.9
And then I can convert the model based on this now.
But with the tensorflow installed, this always happens! and I can run
python3 -c 'import tensorflow' without triggering any errors.
rlo@rlo-mac01 Desktop % python3 /opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/mo.py -m ~/Downloads/bert_large_v1_1_fake_quant.onnx --input "input_ids,attention_mask,token_type_ids" --input_shape "[1,384],[1,384],[1,384]" --keep_shape_ops
[ WARNING ] Use of removed cli option '--keep_shape_ops' detected. The option is ignored.
Model Optimizer arguments:
Common parameters:
- Path to the Input Model: /Users/rlo/Downloads/bert_large_v1_1_fake_quant.onnx
- Path for generated IR: /Users/rlo/Desktop/.
- IR output name: bert_large_v1_1_fake_quant
- Log level: ERROR
- Batch: Not specified, inherited from the model
- Input layers: input_ids,attention_mask,token_type_ids
- Output layers: Not specified, inherited from the model
- Input shapes: [1,384],[1,384],[1,384]
- Mean values: Not specified
- Scale values: Not specified
- Scale factor: Not specified
- Precision of IR: FP32
- Enable fusing: True
- Enable grouped convolutions fusing: True
- Move mean values to preprocess section: None
- Reverse input channels: False
ONNX specific parameters:
Model Optimizer version: 2021.1.0-1237-bece22ac675-releases/2021/1
[libprotobuf ERROR google/protobuf/descriptor_database.cc:394] Invalid file descriptor data passed to EncodedDescriptorDatabase::Add().
[libprotobuf FATAL google/protobuf/descriptor.cc:1356] CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size):
libc++abi.dylib: terminating with uncaught exception of type google::protobuf::FatalException: CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size):
zsh: abort python3 /opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/mo.py
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What version of protobuf are you using? Using the same model optimizer command, I was able to convert this model successfully with OpenVINO toolkit 2021.1 on MacOS 10.14.6, Python 3.6.5 and Protobuf 3.13.0. Try re-installing protobuf and see if that helps.
Regards,
Jesus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Raymond,
Thank you for your question. If you need any additional information from Intel, please submit a new question as this thread is no longer being monitored.
Regards,
Adli

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page