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

Deviations of this implementation from the original paper #23

Open
InnovArul opened this issue Jun 10, 2018 · 4 comments
Open

Deviations of this implementation from the original paper #23

InnovArul opened this issue Jun 10, 2018 · 4 comments

Comments

@InnovArul
Copy link

InnovArul commented Jun 10, 2018

I have come across the following main deviations between the paper(https://arxiv.org/abs/1710.09829) and the implementation of this repo:

  1. In the paper: there are 32 primary capsule layer with 6x6 capsules each of 8 dimensions each. Hence, we needs to have 32 independent convolution layers with 8 output channels.

In the repo: it is implemented to be having 8 independent convolution layers with 32 output channels.

reference:

capsnet

https://github.com/gram-ai/capsule-networks/blob/master/capsule_network.py#L90

  1. According to the paper, every primary capsule shall have a probability distribution to distribute its output to each of the digits capsule. so the total dimension of logits (a.k.a. probability) shall be [batch_size=100, num_primary_capsules=1152, num_digit_capsule=10]. But in the implementation, the dimension is [batch_size=100, num_primary_capsules=1152, num_digit_capsule=10, digit_capsule_dim=16]

https://github.com/gram-ai/capsule-networks/blob/master/capsule_network.py#L67

Please let me know your comments on this.
#24

@Atcold
Copy link

Atcold commented Jun 14, 2018

  1. That's correct
  2. Haven't double checked (yet).

@nitinsurya
Copy link

Is there a need to redo the routing iterations(in digit capsules) for predict/evaluation/test?

@InnovArul
Copy link
Author

@nitinsurya In my view, even during the prediction/test, the routing starts with equal probabilities for each primary capsule. So, we need these iterations even during test. what do you think?

@nitinsurya
Copy link

I agree @InnovArul , got a chance to go through routing algorithm again, and realized, these are dynamically weighted, and are dependent on underlying capsule values, which change with each example.
So, these route weights should be independent for each example, which happens via the current code.

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

3 participants