question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Model conversion error

See original GitHub issue
root@84a3a2a7c8f3:/app# python3 prepare_models.py 
mxnet version: 1.6.0
onnx version: 1.7.0
[12:45:13] INFO - Preparing 'arcface_r100_v1' model...
Downloading model: arcface_r100_v1...
Model file is not found. Downloading.
Downloading /models/mxnet/arcface_r100_v1.zip from http://insightface.ai/files/models/arcface_r100_v1.zip...
100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 237710/237710 [03:47<00:00, 1046.77KB/s]
[12:49:02] INFO - Creating intermediate copy of source model...
[12:49:03] INFO - Applying RetinaFace specific fixes to input MXNet model before conversion...
[12:49:03] INFO - Exporting to ONNX...
[12:49:03] INFO - Converting json and weight file to sym and params
[12:49:03] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.0.0. Attempting to upgrade...
[12:49:03] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!
[12:49:11] INFO - Input shape of the model [(1, 3, 112, 112)] 
[12:49:11] INFO - Exported ONNX file /models/onnx/arcface_r100_v1/arcface_r100_v1.onnx saved to disk
[12:49:11] INFO - Applying ArcFace specific fixes to output ONNX
[12:49:14] INFO - Removing initializer from inputs in ONNX model...
[12:49:14] INFO - Removing intermediate *.symbol and *.params
[12:49:14] INFO - Building TRT engine for arcface_r100_v1...
Traceback (most recent call last):
  File "prepare_models.py", line 45, in <module>
    prepare_models()
  File "prepare_models.py", line 40, in prepare_models
    prepare_backend(model_name=model, backend_name=backend_name, im_size=max_size, force_fp16=force_fp16,
  File "/app/modules/model_zoo/getter.py", line 127, in prepare_backend
    convert_onnx(temp_onnx_model,
TypeError: 'NoneType' object is not callable

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
SthPhoenixcommented, Apr 28, 2021

Workspace could be increased. Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32. might be fixed by converting mxnet weights to fp32 during ONNX conversion, but I believe it wold have same results as TRT automatic cast down.

No implementation obeys reformatting-free rules, at least 2 reformatting nodes are needed, now picking the fastest path instead. This warning is specific to fp16 inference, and I have to admit I have no idea what does it mean yet. I believe if you see some quality drop during detection it is mostly caused by fp16 inference, though I haven’t noticed any significant changes, except for bboxes and landmarks sometimes being different for about 1-2 pixels compared to fp32 Inference. If you have any examples to share, that would be great for debugging.

0reactions
SthPhoenixcommented, Jun 1, 2021

Closing for now as resolved, since above warnings doesn’t affect usability.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Model conversion error codes - Azure Object Anchors
Learn about model conversion error codes and exception errors in the Azure Object Anchors service, and how to address them.
Read more >
Conversion Errors - Alteryx Help
Conversion errors are reported when Alteryx cannot convert data from one field type to another.
Read more >
.net core model binding type conversion errors - Stack Overflow
If user pass string instead of int I have an error like this "Could not convert string to integer: asd. Path 'ClientId', line...
Read more >
Conversion error occurred while checking the consistency of ...
Symptom. When checking the consistency of Production Model DEF, Following errors are shown. *DEF refers to Production Model id *DEF1 refers to Production...
Read more >
UCC21710-Q1: Model conversion error - Power management
I was trying to convert UCC21710-Q1 into Tina TI model , but I am getting same error of Invalid device $CDNENCSTART.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found