-
Notifications
You must be signed in to change notification settings - Fork 432
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
执行test_prune.py出错,为了节省时间,我只用了100个数据进行测试,结果出问题 #83
Comments
我也遇到同样的问题,请问楼主解决了吗? |
我原来也报这个错。 |
调试发现,outputs = model(imgs)的输出中outputs的结果为none。所以,导致sample_metrics为空。但是,有没有哪位能解释下原因 |
Detecting objects: 33%|█████████████████████▋ | 1/3 [00Detecting objects: 67%|███████████████████████████████████████████▎ Detecting objects: 100%|████████████████████████████████████████████████Detecting objects: 100%|█████████████████████████████████████████████████████████████████| 3/3 [00:08<00:00, 2.80s/it]
Computing AP: 100%|██████████████████████████████████████████████████ ████████████████████████████| 1/1 [00:00<?, ?it/s]
Threshold should be less than 1.0462.
The corresponding prune ratio is 0.809.
Channels with Gamma value less than 0.9731 are pruned!
Detecting objects: 33%|█████████████████████▋ | 1/3 [00Detecting objects: 67%|███████████████████████████████████████████▎ Detecting objects: 100%|████████████████████████████████████████████████Detecting objects: 100%|█████████████████████████████████████████████████████████████████| 3/3 [00:07<00:00, 2.63s/it]
Traceback (most recent call last):
File "test_prune.py", line 78, in
threshold = prune_and_eval(model, sorted_bn, percent)
File "test_prune.py", line 69, in prune_and_eval
mAP = eval_model(model_copy)[2].mean()
File "test_prune.py", line 27, in
nms_thres=0.5, img_size=model.img_size, batch_size=4)
File "D:\PycharmProjects\YOLOv3-model-pruning-master\test.py", line 55, in evaluate
assert sample_metrics != []
The text was updated successfully, but these errors were encountered: