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.

Beam Search finalize() bug: not update parents in the "body"

See original GitHub issue

https://github.com/guillaumegenthial/im2latex/blob/8e25d7ec2097e2c6515bbb5b41e8f16b79339967/model/components/beam_search_decoder_cell.py#L247

The “body” function for the tf.while_loop extracts final decoding results time step by time step.

But the state “parents” has not been updated in the body function!

def body(time, outputs_ta, parents): 
    ... (no update of parents) ...
    return (time + 1), outputs_ta, parents

This should be as the following:

return (time + 1), outputs_ta, input_t.parents

since parents for the next step are stored in “input_t” which is extracted for the current time step.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
interxuxingcommented, May 11, 2018

@AaronYALai maybe you are right, i modified the beaming search decoding according to your comment, the performance has 5% improvement on my own dataset.

0reactions
pageedwardcommented, Jun 21, 2021

@AaronYALai @interxuxing I think it should the next parents should be gather_helper(input_t.parents, parents) as the parent_idx is the traceback to the last timestep’s parent at each timestep.

你好,你最近也在也就公式图片到latex么,我跑了这个代码,发现EM指标只有51%,没有达到论文中的76%,这份代码是不是与论文的里提到的方法不一样。我没有看到本篇文章使用了Row encoder 的方法 你的EM51是跑了迭代次数多少 ,衰减多少,我按照默认配置跑6+13(decay),em只有36.57+%

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug listing with status RESOLVED with resolution OBSOLETE ...
Bug :1523 - "[IDEA] Offload work by distributing trivial ebuild maintenance to users, ... does not appear to handle portage updates/moves" status:RESOLVED ...
Read more >
How to Implement a Beam Search Decoder for Natural ...
Let's make this concrete with an example. We can define a function to perform the beam search for a given sequence of probabilities...
Read more >
The fork() System Call
It takes no arguments and returns a process ID. The purpose of fork() is to create a new process, which becomes the child...
Read more >
SWAT USER GROUP
1- Problem in run SWAT. 2- Question about SWAT. 3- Swat input. 4- Daily data. 5- Calibration in SWAT. 6- Arc SWAT model...
Read more >
CS 010 943 - ERIC - Department of Education
there are directions on the tape that do not appear ... Parents and Children Together is published by the Family Literacy ... Our...
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