I could convert yolov3’s self-learned weights file to onnx file using yolov3_to_onnx.py. However, the following error occurs when executing onnx_to_tensorrt.py.
ValueError: cannot reshape array of size 3456 into shape (1, 256, 8, 8)
The input_resolution_yolov3_HW on line 139 of onnx_to_tensorrt.py is set to (256,256). Also, output_shapes on line 148 is set to [(1, 256, 8, 8), (1, 256, 16, 16), (1, 256, 32, 32)]. How can I resolve the error?
Hi @kubo1,
Your model worked fine for me.
Request you to try your model on latest TRT release with the below command trtexec --onnx=yolo_1st.onnx --verbose --explicitBatch --shapes=000_net:64x3x256x256