Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Qxyw1 opened this issue Aug 21, 2024 · 1 comment

Comments

@Qxyw1
Copy link

Qxyw1 commented Aug 21, 2024

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
Copy link

ECEDong commented Aug 29, 2024

have you solved this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants