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

log_softmax Error #4

Open
AliRamamadan opened this issue Mar 31, 2020 · 5 comments
Open

log_softmax Error #4

AliRamamadan opened this issue Mar 31, 2020 · 5 comments

Comments

@AliRamamadan
Copy link

When using the adaptation script using my own dataset I get this error:

return torch._C._nn.log_softmax(input, dim)
RuntimeError: dimension out of range (expected to be in range of [-1, 0], but got 1)
@HuangZiliAndy
Copy link
Owner

Hi, can I know the position of this error? Also can I know your Pytorch version? This project has been written with pytorch 0.4, which is quite old. There might be some changes inside Pytorch, but they are not difficult to fix. Thanks

@AliRamamadan
Copy link
Author

AliRamamadan commented Apr 6, 2020 via email

@widdiot
Copy link

widdiot commented Apr 9, 2020

I am getting the same error at
File "/home/RPNSD/scripts/model/faster_rcnn/faster_rcnn.py", line 125, in forward
RCNN_loss_cls_spk = F.cross_entropy(cls_score_nonzero, rois_label_nonzero)

some inspection shows that it is loading some invalid batch
pred shape:: torch.Size([21, 10234]) label shape:: torch.Size([21])
pred shape:: torch.Size([25, 10234]) label shape:: torch.Size([25])
pred shape:: torch.Size([15, 10234]) label shape:: torch.Size([15])
pred shape:: torch.Size([17, 10234]) label shape:: torch.Size([17])
pred shape:: torch.Size([15, 10234]) label shape:: torch.Size([15])
pred shape:: torch.Size([7, 10234]) label shape:: torch.Size([7])
pred shape:: torch.Size([0]) label shape:: torch.Size([0])

@HuangZiliAndy HuangZiliAndy reopened this Apr 10, 2020
@HuangZiliAndy
Copy link
Owner

I am getting the same error at
File "/home/RPNSD/scripts/model/faster_rcnn/faster_rcnn.py", line 125, in forward
RCNN_loss_cls_spk = F.cross_entropy(cls_score_nonzero, rois_label_nonzero)

some inspection shows that it is loading some invalid batch
pred shape:: torch.Size([21, 10234]) label shape:: torch.Size([21])
pred shape:: torch.Size([25, 10234]) label shape:: torch.Size([25])
pred shape:: torch.Size([15, 10234]) label shape:: torch.Size([15])
pred shape:: torch.Size([17, 10234]) label shape:: torch.Size([17])
pred shape:: torch.Size([15, 10234]) label shape:: torch.Size([15])
pred shape:: torch.Size([7, 10234]) label shape:: torch.Size([7])
pred shape:: torch.Size([0]) label shape:: torch.Size([0])

Seems the problem is that there are utterances with no speech segments. I think this is a bug. You can avoid this issue by (1) avoid such utterances (2) skip this loss if len(cls_score_nonzero) == 0. I will fix this soon. Thanks for pointing out.

@ooza
Copy link

ooza commented Apr 14, 2020

When using the adaptation script using my own dataset I get this error:

return torch._C._nn.log_softmax(input, dim)
RuntimeError: dimension out of range (expected to be in range of [-1, 0], but got 1)

When using the adaptation script using my own dataset I get this error:

return torch._C._nn.log_softmax(input, dim)
RuntimeError: dimension out of range (expected to be in range of [-1, 0], but got 1)

@AliRamamadan
Hi,
I have a small set of audio files that I want to evaluate using the authors' pretrained model.
Can you tell me please how did you proceed to make the inference ?
Thanks

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

4 participants