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

TypeError: cannot unpack non-iterable NoneType object #22

Open
7W7W7W opened this issue Jul 24, 2024 · 1 comment
Open

TypeError: cannot unpack non-iterable NoneType object #22

7W7W7W opened this issue Jul 24, 2024 · 1 comment

Comments

@7W7W7W
Copy link

7W7W7W commented Jul 24, 2024

您好,感谢您的工作,我在改进后的模型中使用您的方法后出现以下错误,请问这个怎么处理呢?谢谢!

Traceback (most recent call last):
File "f:/yolov5-7.0/compress.py", line 612, in
main(opt)
File "f:/yolov5-7.0/compress.py", line 592, in main
train(opt.hyp, opt, device, callbacks)
File "f:/yolov5-7.0/compress.py", line 251, in train
pruned_model = compress(model, val_loader if RANK in [-1, 0] else None, opt)
File "f:/yolov5-7.0/compress.py", line 88, in compress
sen_dict = sens(model, dataloader, args.part)
File "f:\yolov5-7.0\prune\sensitivity.py", line 348, in call
_, _, base_flops = self.model.cuda().info(False, self.inputsize)
TypeError: cannot unpack non-iterable NoneType object

@HankYe
Copy link
Owner

HankYe commented Jul 24, 2024

Hi, thanks for ur attention to our work.
It seems that self.model.cuda().info(False, self.inputsize) return a Nonetype object. But from model_info() function, it should return a tuple. So I suggest you double-check the variable type of self.model.

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