We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I run the model, I get IndexError: index 4 is out of bounds for dimension 0 with size 4. The stack trace points to:
15 raw_logits, concat_logits, part_logits, _, top_n_prob = net(img) 16 part_loss = list_loss(part_logits.view(batch_size * PROPOSAL_NUM, -1), ---> 17 label.unsqueeze(1).repeat(1, PROPOSAL_NUM).view(-1)).view(batch_size, PROPOSAL_NUM) 18 raw_loss = creterion(raw_logits, label) 19 concat_loss = creterion(concat_logits, label) ......................................................................................................................... 84 def list_loss(logits, targets): 85 temp = F.log_softmax(logits, -1) ---> 86 loss = [-temp[i][targets[i].item()] for i in range(logits.size(0))] 87 return torch.stack(loss)```
The text was updated successfully, but these errors were encountered:
Hello, how did you solve this problem!
Sorry, something went wrong.
I do not remember as it was months ago. But my fork Is https://github.com/muellerzr/fastai_nts_net/blob/master/loss_functions.py
Perhaps that can help! :)
I do not remember as it was months ago. But my fork Is https://github.com/muellerzr/fastai_nts_net/blob/master/loss_functions.py Perhaps that can help! :)
Thanks!
No branches or pull requests
When I run the model, I get IndexError: index 4 is out of bounds for dimension 0 with size 4. The stack trace points to:
The text was updated successfully, but these errors were encountered: