rockchip-linux / rknn-toolkit

BSD 3-Clause "New" or "Revised" License
797 stars 174 forks source link

YOLOE->onnx->rknn error #290

Open caolingen2022 opened 2 years ago

caolingen2022 commented 2 years ago

D RKNN output shape(convolution): (10 80 80 5) D Tensor @Conv_Conv_423_20:out0 type: asymmetric_affine D Real output shape: (10, 80, 80, 5) D Process Sigmoid_Sigmoid_436_19 ... D RKNN output shape(sigmoid): (10 80 80 5) D Tensor @Sigmoid_Sigmoid_436_19:out0 type: asymmetric_affine D Real output shape: (10, 80, 80, 5) D Process Reshape_Reshape_437_12_RKNN_mark_perm_435 ... D RKNN output shape(permute): (10 5 80 80) D Tensor @Reshape_Reshape_437_12_RKNN_mark_perm_435:out0 type: float32 D Real output shape: (10, 5, 80, 80) D Process Reshape_Reshape_437_12 ... D RKNN output shape(reshape): (10 5 6400) D Tensor @Reshape_Reshape_437_12:out0 type: float32 D Real output shape: (10, 5, 6400) D Process Concat_Concat_439_7 ... D RKNN output shape(concat): (10 5 8400) D Tensor @Concat_Concat_439_7:out0 type: float32 D Real output shape: (10, 5, 8400) D Process Transpose_Transpose_453_4 ... D RKNN output shape(permute): (10 8400 5) D Tensor @Transpose_Transpose_453_4:out0 type: float32 D Real output shape: (10, 8400, 5) D Process Concat_Concat_454_1 ... D RKNN output shape(concat): (10 8400 10) D Tensor @Concat_Concat_454_1:out0 type: float32 E Catch exception when building RKNN model! E Traceback (most recent call last): E File "/opt/conda/envs/rknn/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1864, in _create_c_op E c_op = c_api.TF_FinishOperation(op_desc) E tensorflow.python.framework.errors_impl.InvalidArgumentError: Dimension 0 in both shapes must be equal, but are 1 and 10. Shapes are [1,8400] and [10,8400]. for 'Concat_Concat_454_1/Concat_Concat_454_1' (op: 'ConcatV2') with input shapes: [10,8400,4], [1,8400,1], [10,8400,5], [] and with computed input tensors: input[3] = <2>. E During handling of the above exception, another exception occurred: E Traceback (most recent call last): E File "/opt/conda/envs/rknn/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper E op_def=op_def) E File "/opt/conda/envs/rknn/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func E return func(*args, **kwargs) E File "/opt/conda/envs/rknn/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3616, in create_op E op_def=op_def) E File "/opt/conda/envs/rknn/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 2027, in init E control_input_ops) E File "/opt/conda/envs/rknn/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1867, in _create_c_op E raise ValueError(str(e)) E ValueError: Dimension 0 in both shapes must be equal, but are 1 and 10. Shapes are [1,8400] and [10,8400]. for 'Concat_Concat_454_1/Concat_Concat_454_1' (op: 'ConcatV2') with input shapes: [10,8400,4], [1,8400,1], [10,8400,5], [] and with computed input tensors: input[3] = <2>. E Please feedback the detailed log file to the RKNN Toolkit development team. E You can also check github issues: https://github.com/rockchip-linux/rknn-toolkit/issues

TRQ-UP commented 1 year ago

onnx模型简化一下,参考https://github.com/daquexian/onnx-simplifier pip install onnxsim python -m onnxsim .onnx _sim.onnx