AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘

在yolov5训练完成后,运行detect.py进行推理测试时,出现这样的错误:

具体错误是下图:

解决方法:

1.点击下面这个报错的方法,进入:

2.修改成如下代码:

 即可!!!!!!

OK完成!!!!

猜你喜欢

转载自blog.csdn.net/qq_35207086/article/details/123879980