PaddlePaddle / PaddlePaddle/FastDeploy

ValueError: Unknow elem_type for softmax_2.tmp_0!

Open
#2,617 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.7k
Forks
756
Avg merge
19h 28m
Merged PRs (30d)
4

Description

PPOCR模型onnx转换成rknn的过程中,报错 Unknow elem_type for softmax_2.tmp_0!,rknn-toolkit2 version: 2.3.2和rknn-toolkit2 version: 2.0.0版本都试了,都是一样的报错,请问怎么解决呢
python3 convert.py ../model/static_rec_model.onnx rk3568
I rknn-toolkit2 version: 2.3.2
--> Config model
done
--> Loading model
E load_onnx: Unknow elem_type for softmax_2.tmp_0!
I ===================== WARN(0) =====================
E rknn-toolkit2 version: 2.3.2
E load_onnx: Traceback (most recent call last):
File "rknn/api/rknn_log.py", line 344, in rknn.api.rknn_log.error_catch_decorator.error_catch_wrapper
File "rknn/api/rknn_base.py", line 1579, in rknn.api.rknn_base.RKNNBase.load_onnx
File "rknn/api/rknn_base.py", line 613, in rknn.api.rknn_base.RKNNBase._create_ir_and_inputs_meta
File "rknn/api/ir_graph.py", line 84, in rknn.api.ir_graph.IRGraph.init
File "rknn/api/ir_graph.py", line 669, in rknn.api.ir_graph.IRGraph.rebuild
File "rknn/api/rknn_log.py", line 95, in rknn.api.rknn_log.RKNNLog.e
ValueError: Unknow elem_type for softmax_2.tmp_0!

I ===================== WARN(0) =====================
E rknn-toolkit2 version: 2.3.2
Traceback (most recent call last):
File "rknn/api/rknn_log.py", line 344, in rknn.api.rknn_log.error_catch_decorator.error_catch_wrapper
File "rknn/api/rknn_base.py", line 1579, in rknn.api.rknn_base.RKNNBase.load_onnx
File "rknn/api/rknn_base.py", line 613, in rknn.api.rknn_base.RKNNBase._create_ir_and_inputs_meta
File "rknn/api/ir_graph.py", line 84, in rknn.api.ir_graph.IRGraph.init
File "rknn/api/ir_graph.py", line 669, in rknn.api.ir_graph.IRGraph.rebuild
File "rknn/api/rknn_log.py", line 95, in rknn.api.rknn_log.RKNNLog.e
ValueError: Unknow elem_type for softmax_2.tmp_0!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "convert.py", line 68, in
ret = rknn.load_onnx(model=model_path)
File "/home/uto/work/ocr/anaconda3/envs/python3.8-tk2/lib/python3.8/site-packages/rknn/api/rknn.py", line 168, in load_onnx
return self.rknn_base.load_onnx(model, inputs, input_size_list, input_initial_val, outputs)
File "rknn/api/rknn_log.py", line 349, in rknn.api.rknn_log.error_catch_decorator.error_catch_wrapper
File "rknn/api/rknn_log.py", line 95, in rknn.api.rknn_log.RKNNLog.e
ValueError: Traceback (most recent call last):
File "rknn/api/rknn_log.py", line 344, in rknn.api.rknn_log.error_catch_decorator.error_catch_wrapper
File "rknn/api/rknn_base.py", line 1579, in rknn.api.rknn_base.RKNNBase.load_onnx
File "rknn/api/rknn_base.py", line 613, in rknn.api.rknn_base.RKNNBase._create_ir_and_inputs_meta
File "rknn/api/ir_graph.py", line 84, in rknn.api.ir_graph.IRGraph.init
File "rknn/api/ir_graph.py", line 669, in rknn.api.ir_graph.IRGraph.rebuild
File "rknn/api/rknn_log.py", line 95, in rknn.api.rknn_log.RKNNLog.e
ValueError: Unknow elem_type for softmax_2.tmp_0!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with convert.py at the rknn.load_onnx(model=model_path) call and reproduce the command using ../model/static_rec_model.onnx for rk3568. Inspect the ONNX graph and the softmax_2.tmp_0 element type, then determine whether the reported RKNN versions can load it; done means identifying a supported conversion path or a precise compatibility issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.