yasenh / libtorch-yolov5

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

当检测一张没有任何可识别内容的图片,引发错误崩溃。 #6

Closed lulersoft closed 3 years ago

lulersoft commented 3 years ago

0x00007FFB68A2A799 处(位于 Demo.exe 中)有未经处理的异常: Microsoft C++ 异常: c10::Error,位于内存位置 0x00000012BCF9BE60 处。

代码中断跳转到 :kernel_lambda.h auto operator()(Parameters... args) -> decltype(std::declval()(std::forward(args)...)) { return kernelfunc(std::forward(args)...); }

调试在这里开始引起崩溃停止: // get the max classes score at each result (e.g. elements 5-84) std::tuple<torch::Tensor, torch::Tensor> max_classes = torch::max(det.slice(1, item_attr_size, item_attr_size + num_classes), 1);

yasenh commented 3 years ago

Thanks for the feedback, fixed in commit cc7887ce024a5f7b64ae4fa381589bf86e56abdb

lulersoft commented 3 years ago

更新后,已经完美解决,谢谢。