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

Question for E_step in EM Routing #36

Open
zmy1116 opened this issue Jan 10, 2019 · 0 comments
Open

Question for E_step in EM Routing #36

zmy1116 opened this issue Jan 10, 2019 · 0 comments

Comments

@zmy1116
Copy link

zmy1116 commented Jan 10, 2019

In the function E_step in the method CapsLayer-master/capslayer/core/routing.py

The Gaussian probability is calculated as following:
normalized_vote = cl.divide(tf.square(vote - pose), 2 * tf.exp(log_var))
log_probs = normalized_vote + cl.log(2 * np.pi) + log_var
log_probs = -0.5 * cl.reduce_sum(log_probs, axis=-1, keepdims=True)

since you are pulling out the -0.5 in the third line, in the first line, shoudn't we have tf.exp(log_var)) instead of 2 * tf.exp(log_var))?

Also in the following two lines:
log_activation_logit = log_activation + log_probs
log_activation_logit = log_probs

I think the second line should not be there.

I'm just starting to read about capsule net and I'm trying to match the implementation with the pseudocode in the paper so I could be wrong...

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