yasenh / libtorch-yolov5

A LibTorch inference implementation of the yolov5
MIT License
376 stars 114 forks source link

error when running inference #54

Open gorodion opened 3 years ago

gorodion commented 3 years ago
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.
:
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/conv.py(440): _conv_forward
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/conv.py(443): forward
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py(1039): _slow_forward
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py(1051): _call_impl
/content/yolov5/models/common.py(48): forward_fuse
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py(1039): _slow_forward
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py(1051): _call_impl
/content/yolov5/models/common.py(206): forward
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py(1039): _slow_forward
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py(1051): _call_impl
/content/yolov5/models/yolo.py(155): forward_once
/content/yolov5/models/yolo.py(123): forward
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py(1039): _slow_forward
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py(1051): _call_impl
/usr/local/lib/python3.7/dist-packages/torch/jit/_trace.py(959): trace_module
/usr/local/lib/python3.7/dist-packages/torch/jit/_trace.py(744): trace
export.py(35): export_torchscript
export.py(154): run
export.py(187): main
export.py(192): <module>
Serialized   File "code/__torch__/torch/nn/modules/conv.py", line 11
    input: Tensor) -> Tensor:
    _0 = self.bias
    x = torch._convolution(input, self.weight, _0, [1, 1], [1, 1], [1, 1], False, [0, 0], 1, False, False, True, True)
        ~~~~~~~~~~~~~~~~~~ <--- HERE
    return x
TianchaoHuo commented 3 years ago

same issuse. Have you solved this problem?

dongdong-cai commented 2 years ago

same issuse. Have you solved this problem?