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

About "tf.reduce_mean(input_vectors, axis = 1)" #1

Open
ZhuYuHe opened this issue Mar 1, 2018 · 0 comments
Open

About "tf.reduce_mean(input_vectors, axis = 1)" #1

ZhuYuHe opened this issue Mar 1, 2018 · 0 comments

Comments

@ZhuYuHe
Copy link

ZhuYuHe commented Mar 1, 2018

when compute x = (1/N) sum_i xi, I notice that you use tf.reduce_mean(input_vectors, axis = 1).
However, N in the formula is the length of sentence, but tf.reduce_mean compute x use the length of sentence after padding.
So, the correct method to compute x should be sum(x)/len(x).

@ZhuYuHe ZhuYuHe changed the title 关于 tf.reduce_mean(input_vectors, axis = 1) About "tf.reduce_mean(input_vectors, axis = 1)" Mar 1, 2018
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