capsule-net-pytorch icon indicating copy to clipboard operation
capsule-net-pytorch copied to clipboard

Deviations of this implementation from the original paper

Open InnovArul opened this issue 5 years ago • 2 comments

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

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:

https://photos.app.goo.gl/FeCg4ejNdF3eVPvh6

https://github.com/cedrickchee/capsule-net-pytorch/blob/master/capsule_layer.py#L52

I have noticed this issue in another repo as well. I'm not sure if there is a misunderstanding in my interpretation of the paper. https://github.com/gram-ai/capsule-networks/issues/23

Can you please check and comment on this?

InnovArul avatar Aug 19 '18 17:08 InnovArul

This is a good question! I wonder if it has to do with weight sharing? It says in the paper that "each capsule in the [6 × 6] grid is sharing their weights with each other" so I'm wondering if its only per capsule dimension. Any input is useful! This is just my conjecture

nabsabraham avatar Dec 09 '18 05:12 nabsabraham

I believe the sharing of weights in [6 x 6] grid is achieved by default due to the use of Convolution layer with 8 dimensions (Channels). Don't you think so?

InnovArul avatar Dec 11 '18 03:12 InnovArul