-
-
Notifications
You must be signed in to change notification settings - Fork 17.3k
Description
Before submitting a bug report, please be aware that your issue must be reproducible with all of the following, otherwise it is non-actionable, and we can not help you:
- Current repo: run
git fetch && git status -unoto check andgit pullto update repo - Common dataset: coco.yaml or coco128.yaml
- Common environment: Colab, Google Cloud, or Docker image. See https://github.com/ultralytics/yolov5#environments
If this is a custom dataset/training question you must include your train*.jpg, test*.jpg and results.png figures, or we can not help you. You can generate these with utils.plot_results().
🐛 Bug
A clear and concise description of what the bug is.
To Reproduce (REQUIRED)
Input:
python ./models/export.py --weights ../init/yolov5s.pt --img 640 --batch 1
Output:
Namespace(batch_size=1, img_size=[640, 640], weights='../init/yolov5s.pt')
Fusing layers...
Model Summary: 140 layers, 7.45958e+06 parameters, 0 gradients
Starting TorchScript export with torch 1.7.0...
D:\ProgramData\Anaconda3\lib\site-packages\torch\jit\_trace.py:940: TracerWarning: Encountering a list at the output of the tracer might cause the trace to be incorrect, this is only valid if the container structure does not change based on the module's inputs. Consider using a constant container instead (e.g. for `list`, use a `tuple` instead. for `dict`, use a `NamedTuple` instead). If you absolutely need this and know the side effects, pass strict=False to trace() to allow this behavior.
_force_outplace,
TorchScript export success, saved as ../init/yolov5s.torchscript.pt
Starting ONNX export with onnx 1.8.0...
ONNX export success, saved as ../init/yolov5s.onnx
Starting CoreML export with coremltools 4.0...
Tuple detected at graph output. This will be flattened in the converted model.
Converting graph.
Adding op '1' of type const
....
Converting op x.2 : _convolution
Converting Frontend ==> MIL Ops: 2%|█ | 23/932 [00:00<00:00, 962.15 ops/s]
CoreML export failure: unexpected number of inputs for node x.2 (_convolution): 13
Export complete (6.27s). Visualize with https://github.com/lutzroeder/netron.
Environment
- OS: [windows10]
- GPU [nvidia gtx1060]
Additional context
git clone https://github.com/ultralytics/yolov5.git
python train.py --img 640 --batch 8 --epochs 300 --data ./test_train_datas/data.yaml --cfg models/yolov5s.yaml
train done
get bast.pt
python ./models/export.py --weights ./best.pt --img-size 640 640
python ./models/export.py --weights ../best.pt --img 640 --batch 1
python ./models/export.py --weights ../yolov5s.pt --img 640 --batch 1
all is :
CoreML export failure: unexpected number of inputs for node x.2 (_convolution): 13
help!