libtorch-yolov5
libtorch-yolov5 copied to clipboard
run yolov5 v4.0 error
run: ./libtorch-yolov5 --source ../images/bus.jpg --weights ../weights/yolov5s.torchscript.pt --gpu --view-img error: terminate called after throwing an instance of 'torch::jit::ErrorReport' what():
aten::_convolution(Tensor input, Tensor weight, Tensor? bias, int[] stride, int[] padding, int[] dilation, bool transposed, int[] output_padding, int groups, bool benchmark, bool deterministic, bool cudnn_enabled) -> (Tensor): Expected at most 12 arguments but found 13 positional arguments.
why found 13 positional arguments?
system is NVIDIA Jetson Xavier NX and docker opencv 4.4.0 libtorch 1.6.0 cuda 10.2 yolov5 v4.0
Hi @caixiong110, could you try yolov5 v3.0 or v3.1. Seems they modified the arch since v4.0 but I don't have time to catch it up at this moment.
@caixiong110 I am facing the same error as you. Do you have any solution?
I am using v3.0 and v3.1, and facing this error too.
@Apostatee The root cause for this error is that pytorch version and libtorch are not the same. you can check your pytorch version and it has nothing to do with whether it is YoLov5-V3.0 or YoLov5-V3.1.
Hope this information can help you.
aten::_convolution(Tensor input, Tensor weight, Tensor? bias, int[] stride, int[] padding, int[] dilation, bool transposed, int[] output_padding, int groups, bool benchmark, bool deterministic, bool cudnn_enabled) -> (Tensor): Expected at most 12 arguments but found 13 positional arguments.
hello,Do you have sovle this problem?
i solved it, you must ensure version consistency that python install libtorch with you C++ used libtorch version,such as libtorch 1.7 with same python used install version 'libtorch 1.7' (or 1.6 sames).
At 2022-01-22 20:53:48, "zhujinwen0924" @.***> wrote:
aten::_convolution(Tensor input, Tensor weight, Tensor? bias, int[] stride, int[] padding, int[] dilation, bool transposed, int[] output_padding, int groups, bool benchmark, bool deterministic, bool cudnn_enabled) -> (Tensor): Expected at most 12 arguments but found 13 positional arguments.
hello,Do you have sovle this problem?
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.Message ID: @.***>