极简yolov5转torchscript
最近在使用yolov5转torchscript模型做推理时遇到了这样一个问题:RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!不是所有tensor都在同个设备上,但是检查了model的weights和input都是在一个设备上,就很疑惑,后来发现是yolov5推理时的detect层的融框操作导致。
原创
2022-03-18 17:28:02 ·
4588 阅读 ·
0 评论