-
Notifications
You must be signed in to change notification settings - Fork 137
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
IndexError: index 0 is out of range #59
Comments
目前我又重新复现了该项目,补充了缺少的文件,可以重新尝试一下 |
好哦 多谢啦 我在出差 回去试试 您有qq微信嘛 我目前还有些问题
在准备面试 希望不吝赐教
Thank you very much.
Sincerely yours
Yexing Li
…________________________________
From: ZJU-lishuang ***@***.***>
Sent: 19 October 2021 02:18
To: ZJU-lishuang/yolov5_prune ***@***.***>
Cc: Louis ***@***.***>; Author ***@***.***>
Subject: Re: [ZJU-lishuang/yolov5_prune] IndexError: index 0 is out of range (#59)
目前我又重新复现了该项目,补充了缺少的文件,可以重新尝试一下
―
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#59 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AEO2FABREAHVRICVKWUXUQ3UHULVXANCNFSM5FUTXAYA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
网络结构没对上,旧版本只支持yolov5s模型 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
首先谢谢您的教程,我最近在看网络裁剪,然后找到了这
https://blog.csdn.net/m0_53608998/article/details/117687416
在运行时发现少了很多文件,我就从
repo
https://github.com/ZJU-lishuang/yolov5_prune
缺省文件从下面找
https://github.com/ZJU-lishuang/yolov5-v4
https://github.com/ultralytics/yolov5
然后我直接裁剪发现
IndexError: index 0 is out of range
我重新训练的时候也是报错,请问是什么问题呢
Traceback (most recent call last):
File "train.py", line 520, in
train(hyp, opt, device, tb_writer, wandb)
File "train.py", line 86, in train
model = Model(opt.cfg or ckpt['model'].yaml, ch=3, nc=nc).to(device) # create
File "C:\Zero\Python\yolov5_prune-4\models\yolo.py", line 80, in init
m.stride = torch.tensor([s / x.shape[-2] for x in self.forward(torch.zeros(1, ch, s, s))]) # forward
File "C:\Zero\Python\yolov5_prune-4\models\yolo.py", line 110, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "C:\Zero\Python\yolov5_prune-4\models\yolo.py", line 130, in forward_once
x = m(x) # run
File "C:\Users\LOUIS\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Zero\Python\yolov5_prune-4\models\yolo.py", line 37, in forward
x[i] = self.mi # conv
File "C:\Users\LOUIS\Anaconda3\lib\site-packages\torch\nn\modules\container.py", line 164, in getitem
return self._modules[self._get_abs_string_index(idx)]
File "C:\Users\LOUIS\Anaconda3\lib\site-packages\torch\nn\modules\container.py", line 154, in _get_abs_string_index
raise IndexError('index {} is out of range'.format(idx))
IndexError: index 0 is out of range
Process finished with exit code 0
The text was updated successfully, but these errors were encountered: