yasenh / libtorch-yolov5

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

auto detections = output.toTuple()->elements()[0].toTensor(); #5

Closed lulersoft closed 3 years ago

lulersoft commented 3 years ago

执行到 auto detections = output.toTuple()->elements()[0].toTensor(); 出现错误中断:

inline c10::intrusive_ptr IValue::toTuple() const & { AT_ASSERT(isTuple(), "Expected Tuple but got ", tagKind()); return toIntrusivePtr(); }

yasenh commented 3 years ago

@lulersoft please refer to issue #4 , make sure you set "model.model[-1].export = False" when export the model

lulersoft commented 3 years ago

谢谢,已经成功运行,非常棒。

huhuhu12138 commented 3 years ago

谢谢,已经成功运行,非常棒。

你好,请教一下

huhuhu12138 commented 3 years ago

我设置为false 导出会失败,请问您这边是如何解决的

MHGL commented 3 years ago

首先非常感谢ultralytics大神,我们团队把yolov5模型重构了,并且复现了和原仓库同样的水平,优势是可以端到端转换移动端模型,如果你有时间有需要,请移步yolov5,期待各位的驾临。