Open tensorflower opened 4 years ago
try to change line in the onnx_simplify
model_simp, check = simplify(model, skip_fuse_bn=True, input_shapes={'data': [1, 3, 640, 640]})
or take the onnx model generated ( it is crashing in ther simplifiing part ) and use python3 -m onnxsim yolov5_1.onnx outputmodel.onnx
try to change line in the onnx_simplify
model_simp, check = simplify(model, skip_fuse_bn=True, input_shapes={'data': [1, 3, 640, 640]})
or take the onnx model generated ( it is crashing in ther simplifiing part ) and usepython3 -m onnxsim yolov5_1.onnx outputmodel.onnx
yeah,the first option didn't work,it's the same error,but the second it works! When I used yolov5l models, I got a very confusing result: tensorrt engine is a little slower than the torch
I do not know the exact reason, but I was not able to get speedup with gtx1080ti ( natively without fp16 ). I was able to get speedup about 30% with nvidia xavier, but with cloud v100, I am getting huge improvement. The data are from medium model:
image 1/1 yolov5/images800/522087621.jpeg: (1, 3, 800, 800)
(1,)
(1, 300, 4)
(1, 300)
(1, 300)
avg GPU time: 0.00890489419301351
avg GPU compute time: 0.007609507772657606
avg pre time: 0.0012581666310628255
avg post time: 3.721978929307726e-05
[array([[[ 173.37, 91.065, 626.8, 618.57, 0.51645, 75],
[ 170.67, 71.129, 637.8, 760.47, 0.45298, 61]]], dtype=float32)]
I've tried this on pascal cards, say P4, I got similar results and no performance gain was achieved. I need to study more on this in following weeks.
Hello I also got the same problems, I use TRT 7.13, torch1.4, onnx 1.6, onnx-simplifier0.2.9 and V100 and after I tried the way of batrlatom, I still got the results of "segmentation fault (core dumped)"
Hello I also got the same problems, I use TRT 7.13, torch1.4, onnx 1.6, onnx-simplifier0.2.9 and V100 and after I tried the way of batrlatom, I still got the results of "segmentation fault (core dumped)"
I have met the same problem as you. Have you solved it ? thank you very much!
env: torch==1.4.0 + onnx==1.6.0 + TRT 7.0 onnx-simplifier-0.2.9