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

Beam search validation #26

Open
yellowjs0304 opened this issue Oct 22, 2020 · 4 comments
Open

Beam search validation #26

yellowjs0304 opened this issue Oct 22, 2020 · 4 comments

Comments

@yellowjs0304
Copy link

Hi, Is this any way to test your model as beam search?

I saw the code in train.py and agent.py ("beam_valid", "beam_search_test")

Could you please share any way to use it?

@airsplay
Copy link
Owner

Thanks. Please check this issue for a reference.

@yellowjs0304
Copy link
Author

thank u for reply. I'm sorry it's too late..
I already saw that and It seems you already updated the beam search code in github with named "_dijkstra"
I have confusing with the code "_dijkstra" function.
why is this named _dijkstra? i thought the beam search is only rely on agent's logits. but in your code it seems it's related with the dijkstra path.

It seems i haven't quite understood your system.

@airsplay
Copy link
Owner

airsplay commented Nov 3, 2020

why is this named _dijkstra? i thought the beam search is only rely on agent's logits. but in your code it seems it's related with the dijkstra path.

This algorithm still follows the beam-search approach mentioned in the Speaker-Follower paper. I modified it to a greedy approach (Dijkstra algorithm) that only expands the state with the lowest score at each time step. It would empirically have a better estimation of the best path than the beam-search approach without losing speed.

@yellowjs0304
Copy link
Author

Okay I understood. If so, is it affected with the agent(listener) model's tokenizer?
Because I tried with my own models which has bert embedding layer, and it returns really low success rate with beam search...
In greedy search it doesn't that so low.
Could you please give me some opinion about this?

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

2 participants