您好,想问一下在运行yolop的时候报 result type Float can't be cast to the desired output type long int 这个错误,改怎么修改呢
不知道你这个问题是否已经解决, 如果还没有解决的话:RuntimeError: result type Float can’t be cast to the desired output type long int
问题原因:
官网的yolov5-master版本可以正常运行,但是yolov5-5.0/yolov5-6.1等版本就是不可以运行
问题解决:
修改【utils】中的【loss.py】里面的两处内容
一处替换成:anchors, shape = self.anchors[i], p[i].shape
一处替换成:indices.append((b, a, gj.clamp_(0, shape[2] - 1), gi.clamp_(0, shape[3] - 1))) # image, anchor, grid