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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facing Error while executing #1

Open
ayamgupta opened this issue Dec 22, 2022 · 2 comments
Open

Facing Error while executing #1

ayamgupta opened this issue Dec 22, 2022 · 2 comments

Comments

@ayamgupta
Copy link

Hey I am new to this can you help me out with the error?

YOLOv5 馃殌 1888663 torch 1.13.1+cu117 CPU

Fusing layers...
Model Summary: 308 layers, 21041679 parameters, 0 gradients
WARNING: --img-size [720, 1280] must be multiple of max stride 32, updating to [736, 1280]
Traceback (most recent call last):
File "/home/ayamgupta/ps/PedestrianSpeedEstimator/track.py", line 325, in
detect(opt)
File "/home/ayamgupta/ps/PedestrianSpeedEstimator/track.py", line 145, in detect
pred = model(img, augment=opt.augment, visualize=visualize)
File "/home/ayamgupta/mambaforge/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ayamgupta/ps/PedestrianSpeedEstimator/yolov5/models/common.py", line 384, in forward
y = self.model(im) if self.jit else self.model(im, augment=augment, visualize=visualize)
File "/home/ayamgupta/mambaforge/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ayamgupta/ps/PedestrianSpeedEstimator/./yolov5/models/yolo.py", line 126, in forward
return self._forward_once(x, profile, visualize) # single-scale inference, train
File "/home/ayamgupta/ps/PedestrianSpeedEstimator/./yolov5/models/yolo.py", line 149, in _forward_once
x = m(x) # run
File "/home/ayamgupta/mambaforge/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ayamgupta/mambaforge/lib/python3.10/site-packages/torch/nn/modules/upsampling.py", line 157, in forward
recompute_scale_factor=self.recompute_scale_factor)
File "/home/ayamgupta/mambaforge/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1269, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'

@shriram1998
Copy link
Owner

shriram1998 commented Dec 28, 2022

Hi,
Seems to be an issue with yolov5 package and its dependencies. You could search for possible solutions. Here is a good starting point (ultralytics/yolov5#6948)

@ayamgupta
Copy link
Author

Thanks. resolved the issue. also the latest pytorch version conflicts. It works perfectly now.

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