-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Routing algorithm #8
Comments
Agree. I still have difficulties in understanding how |
@bshao001 You're right, I misunderstood the routing algorithm. Thank you for your pointing out. The interesting thing is, the loss can go down steadily (not effective as the result of the paper). I'm fixing it. |
I don't think the routing process could be unfolded into 6 layers, because u_ij is only calculated once in one forward pass. |
Here is some of my idea about log prior or bias. @bshao001 I think the |
@naturomics |
To the owner and all other visitors:
I do not mean to be offensive, but I decided to speak out my understanding of this routing algorithm as I have not seen any correct implementation so far yet.
The correct implementation of the routing algorithm should be treated something like the dynamic RNN in TensorFlow. In other words, if you implement it in a static way, and if you do 3 iterations, the two caps layers are actually 6 such layers. The primary layer performs line 4 and output to the digits layer, and then the digits layer performs line 5, 6, and 7 with b_ij updated, and then loop back to the primary layer again. This will need to use tf.while_loop if you use a dynamic way.
What confuses me or stops me from implementing myself is I am not sure how the weights and biases associated with the conv units are updated, as I assume other than the weights and biases associated with the capsules, each individual conv unit inside still carries its own parameters. Maybe I missed this by reading the paper.
Feel free to correct me if you believe I am wrong. Thanks.
The text was updated successfully, but these errors were encountered: