prj-tensorrt demo.py reshape issue
Harryqu123 opened this issue · 4 comments
Hi, I am using this repo's code together with the zhihu tutorial provided here.
https://zhuanlan.zhihu.com/p/106774468
Thank you for opensource the code in the first hand and I have some problem.
Because I am using tensorrt 7.0.0.11, I use the given onnx model to regenerate the trt file. However, when I run the demo.py code provided in the prj-tensorrt folder, I get the following error
ValueError: cannot reshape array of size 4177920 into shape (1,1,120,160)
This error remains there after I change the onnx model to onnx_1920_1080 follow the code from the zhihu tutorial, only the size change from some other value to this 4177920. do you have any suggestion on how to solve this reshape value error?
Thanks in advance.
Actually I find out that the size is twice the size of the size of the input.
Like if I transfer onnx with 1920 * 1080, the size will be 4177920, which is roughly two times considering the rounding
If I transfer with 640 * 480, the size will be 614400 which is exactly 640 * 480 * 2
But I still do not figure out why is this
Actually I find out that the size is twice the size of the size of the input.
Like if I transfer onnx with 1920 * 1080, the size will be 4177920, which is roughly two times considering the rounding
If I transfer with 640 * 480, the size will be 614400 which is exactly 640 * 480 * 2
But I still do not figure out why is this
I have the same issue,have you fixed it ?
I met the same one /sad
输入图像的宽高必须是32的整数倍。19201080需要调整为19201088