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

Why sampling from a multinomial distribution? #3

Open
pyun-ram opened this issue Aug 26, 2020 · 0 comments
Open

Why sampling from a multinomial distribution? #3

pyun-ram opened this issue Aug 26, 2020 · 0 comments

Comments

@pyun-ram
Copy link

Hi @ariseff , thanks for sharing the awesome code repo! :)
Your code works well, but I cannot understand why we need to do sampling from a multinomial distribution?
Can we replace it with argmax or just with no-sampling?

class_ind = tf.to_int32(tf.multinomial(tf.log(probs), 1)[0][0])

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

1 participant