question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

hi, thanks for your open-source code. I met a bug when I run the beam search code in utilis/beamsearch.py line96: self.mask = self.mask.gather(1, perm_mask) where ‘perm_mask’ should be a LongTensor type, but here its type is FloatTensor. It makes severl beam search-based functions fail to use.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
chaitjocommented, Dec 5, 2021

Here are some related issues and discussions for reference:

Maybe one simple thing to try first to get the code to run would be to update backpointers via integer division:

# Update backpointers
prev_k = bestScoresId // self.num_nodes
0reactions
chaitjocommented, Dec 7, 2021

Great, happy to help, no worries.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues - SonarQube Documentation
Issue types · Bug: A coding mistake that can lead to an error or unexpected behavior at runtime. · Vulnerability: A point in...
Read more >
Coding problems? Learn what to do when you're stuck
7 tips for getting unstuck when programming · Don't panic · Read the error · Check your spelling · Verbalize the problem ·...
Read more >
Creating an issue - GitHub Docs
To open an issue about code in a pull request, navigate to the pull request and click Files changed. Then, browse to the...
Read more >
How to Fix Your Code When You Can't Figure Out the Problem
The best practice for this type of programming is to “try, fail fast, and iterate”. There are no dumb ways to finding a...
Read more >
Issues | SonarQube Docs
Bug – A coding error that will break your code and needs to be fixed immediately. Vulnerability – A point in your code...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found