Yolov3: export onnx with Segmentation fault

Created on 21 Mar 2020  路  2Comments  路  Source: ultralytics/yolov3

When I export onnx,it always come out with Segmentation fault even if I change the feature fusing to concat, there still exist Segmentation fault,could anyone help?

馃悰 Bug

Model Summary: 225 layers, 6.29987e+07 parameters, 6.29987e+07 gradients
Fusing layers...
Model Summary: 152 layers, 6.29719e+07 parameters, 6.29719e+07 gradients
/home/zhangyi19930620/detect/yolov3-master-new/models.py:137: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if dc > 0: # slice input
/home/zhangyi19930620/detect/yolov3-master-new/models.py:139: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
elif dc < 0: # slice feature
Segmentation fault (core dumped)

To Reproduce

Steps to reproduce the behavior:

  1. change ONNX_EXPORT = True in model.py
  2. run detect.py

Environment

pytorch 1.4
TITAN V / 2080ti both tried

bug

Most helpful comment

import onnx should be put before import torch

All 2 comments

import onnx should be put before import torch

@zhangyilalala got it, thanks for the bug report!

Was this page helpful?
0 / 5 - 0 ratings