Closed bzisl closed 2 years ago
@bzisl your ONNX model exports correctly, the simplification step fails. Not all arguments are compatible in all combinations, it looks like --simplify is simply not compatible with the rest of your arguments.
Ok, thanks!
El 8 feb 2022, a las 12:34, Glenn Jocher @.***> escribiΓ³:
@bzisl https://github.com/bzisl your ONNX model exports correctly, the simplification step fails. Not all arguments are compatible in all combinations, it looks like --simplify is simply not compatible with the rest of your arguments.
β Reply to this email directly, view it on GitHub https://github.com/ultralytics/yolov5/issues/6560#issuecomment-1032511020, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALCG55AE3LYZLX376TXYWRDU2D5VDANCNFSM5NY3DPRQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.
============================ Paco Blasco - BZ Invest SL
email: @. phone: +34 615 237 233 skype: paco.blasco gmail: @.
Nope. The problem remains. Without --simplify there is no error message when you call export, but, when you load the model into Onnxruntime:
Load model from bb_v5n_gpu_fp16.onnx failed:Type Error: Type parameter (T) of Optype (Concat) bound to different types (tensor(float) and tensor(float16) in node (Concat_307).
@bzisl π hi, thanks for letting us know about this possible problem with YOLOv5 π. We've created a few short guidelines below to help users provide what we need in order to get started investigating a possible problem.
When asking a question, people will be better able to provide help if you provide code that they can easily understand and use to reproduce the problem. This is referred to by community members as creating a minimum reproducible example. Your code that reproduces the problem should be:
For Ultralytics to provide assistance your code should also be:
git pull
or git clone
a new copy to ensure your problem has not already been solved in master.If you believe your problem meets all the above criteria, please close this issue and raise a new one using the π Bug Report template with a minimum reproducible example to help us better understand and diagnose your problem.
Thank you! π
π Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.
Access additional YOLOv5 π resources:
Access additional Ultralytics β‘ resources:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!
Thank you for your contributions to YOLOv5 π and Vision AI β!
solved it?
hello,I encountered the same problem when using yolov3(windows,pytorch1.10.2, use onnxsim 0.4.7 or not use). When onnxruntime is used, an error is reported: failed:Type Error: Type parameter (T) of Optype (Concat) bound to different types (tensor(float) and tensor(float16) in node (Concat_394). However, in netron, the conversion of fp16 bit model data is successful.
chinese peopleοΌ i have solved itοΌwechat zxx15277368495
---Original--- From: @.> Date: Fri, Aug 26, 2022 08:50 AM To: @.>; Cc: @.**@.>; Subject: Re: [ultralytics/yolov5] Error export ONNX in FP16 (--half) (Issue #6560)
this might be the problem of yolo .pt model to onnx using --half, concat layer(operation) is not allowed float type date concat with float16 type data.
@yangwenwu92 Thank you for pointing that out. It seems the specific issue is related to the conversion of .pt model to ONNX using the --half flag. It appears that the concat layer operation is not allowing float type data to be concatenated with float16 type data. We are continuously improving YOLOv5, and your inputs definitely help in this process. If you have any further questions or concerns, feel free to ask!
Search before asking
YOLOv5 Component
Export
Bug
When you exports ONNX with FP16 (half), there is an error and the .onnx file has an error:
python3 export.py --img {imgsize} --device 0 --weights {project}/{name}/weights/best.pt --include onnx --half --simplify
Environment
VoloV5 V6, RTX 3090,
Minimal Reproducible Example
No response
Additional
No response
Are you willing to submit a PR?