hukaixuan19970627 / yolov5_obb

yolov5 + csl_label.(Oriented Object Detection)(Rotation Detection)(Rotated BBox)基于yolov5的旋转目标检测
GNU General Public License v3.0
1.83k stars 427 forks source link

raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor' #663

Open Qxyw1 opened 2 months ago

Qxyw1 commented 2 months ago

Traceback (most recent call last): File "detect.py", line 251, in main(opt) File "detect.py", line 246, in main run(vars(opt)) File "D:\python\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, kwargs) File "detect.py", line 101, in run model.warmup(imgsz=(1, 3, imgsz), half=half) # warmup File "D:\yolov5_obb-master\models\common.py", line 436, in warmup self.forward(im) # warmup File "D:\yolov5_obb-master\models\common.py", line 384, in forward y = self.model(im) if self.jit else self.model(im, augment=augment, visualize=visualize) File "D:\python\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(input, kwargs) File "D:\yolov5_obb-master\models\yolo.py", line 147, in forward return self._forward_once(x, profile, visualize) # single-scale inference, train File "D:\yolov5_obb-master\models\yolo.py", line 177, in _forward_once x = m(x) # run File "D:\python\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, kwargs) File "D:\python\lib\site-packages\torch\nn\modules\upsampling.py", line 154, in forward recompute_scale_factor=self.recompute_scale_factor) File "D:\python\lib\site-packages\torch\nn\modules\module.py", line 1207, in getattr raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'

ECEDong commented 2 months ago

have you solved this problem?