Table of contents
报错:AttributeError: ‘Upsample’ object has no attribute ‘recompute_scale_factor’
As shown in the picture:
Solution
1. Click the path of the error line to enter the edit page
2. Modify the original code (lines 153-154) to the following (line 155):
namely:
return F.interpolate(input, self.size, self.scale_factor, self.mode, self.align_corners)
problem solved
After saving, run detect.py again, you can: Let’s
take a look at the training results
Precautions
Before running detect.py, you should put the weight file corresponding to YOLOV5 in the project folder:
here is the official weight file, you can click the link below to download it yourself:
https://download.csdn.net/download/weixin_43401024/85225886