-
Notifications
You must be signed in to change notification settings - Fork 93
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
稀疏化训练时出现这个错,没明白原因。希望大佬给点建议RuntimeError: cannot perform reduction function max #29
Comments
感觉有点像没有加载对labels文件,所以没法去计算loss,你可以看看有没有加载到对应图片的labels文件 |
@leJson 你是在Pascal Voc上跑这个吗? |
我跑的自己的数据, |
The same error happen, the original use coco dataset, run in ubuntu 16.04have you already solve the issue?@caesar-yabo |
楼上有答案的,你仔细看看,是不是加载图像的时候路径错了.这个报错一般是没加载到数据 |
@leJson Thanks a lot, I solve the issue, the key point is put folder "images" and "label" at the same folder. The folder path as below:
|
Can you show us the VOC data? thanks |
I was doing the task for test coco, not VOC right now, after check this, I will these test later. As I get the information, the key point to deal with VOC data is you need to change the parse_config.py. In the code, you need to change "images" to "JPEGImages"
if this is not working, modify utils/datasets.py,‘images’ to ‘’JPEGImages is suggetion. |
I have ignored parse_config.py ,thanks for your information |
Thanks for your information!I have solved the problem!The labels data is not loaded in!you should check your parse_config.py to see if it has loaded your labels。 |
load network
done!
load weightsfile
done!
Traceback (most recent call last):
File "sparsity_train.py", line 154, in
train()
File "sparsity_train.py", line 100, in train
loss = model(imgs, targets)
File "/home/caesar/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/caesar/deep/yolov3_limming/yolomodel.py", line 353, in forward
x, *losses = self.module_list[i][0](x, targets)
File "/home/caesar/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/caesar/deep/yolov3_limming/yolomodel.py", line 136, in forward
loss_cls = (1 / nB) * self.ce_loss(pred_cls[mask], torch.argmax(tcls[mask], 1))
RuntimeError: cannot perform reduction function max on tensor with no elements because the operation does not have an identity
The text was updated successfully, but these errors were encountered: