After running this command, there are two problems, the first one I know will be solved when onnx==1.8.0, or it can be solved by lowering the version, but the second problem I did not find, I hope I can get help
python models\export.py --weight .\runs\exp1\weights\last.pt --img 640 --batch 1
Starting ONNX export with onnx 1.7.0...
Fusing layers...
Model Summary: 140 layers, 7.45958e+06 parameters, 6.61683e+06 gradients
ONNX export failure: Exporting the operator hardswish to ONNX opset version 12 is not supported.
Starting CoreML export with coremltools 4.0b2...
CoreML export failure: module 'torch._C' has no attribute '_jit_pass_canonicalize_ops'
Hello @Single430, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook , Docker Image, and Google Cloud Quickstart Guide for example environments.
If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.
If this is a custom model or data training question, please note Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:
For more information please visit https://www.ultralytics.com.
maybe the version of torch 1.6.0 that caused the problem.
https://github.com/apple/coremltools/issues/827
they said PyTorch 1.5.1 works fine with coremltoolsv4.0b2
Now both onnx and coremltools can not work fine with yolov5 v3.0
maybe the version of torch 1.6.0 that caused the problem.
apple/coremltools#827
they said PyTorch 1.5.1 works fine with coremltoolsv4.0b2
Now both onnx and coremltools can not work fine with yolov5 v3.0
I went to read this issue, it helped me a lot, thank you very much!
Most helpful comment
maybe the version of torch 1.6.0 that caused the problem.
https://github.com/apple/coremltools/issues/827
they said PyTorch 1.5.1 works fine with coremltoolsv4.0b2
Now both onnx and coremltools can not work fine with yolov5 v3.0