brjathu / deepcaps

Official Implementation of "DeepCaps: Going Deeper with Capsule Networks" paper (CVPR 2019).
MIT License
151 stars 48 forks source link

The network is a 16 layers of CNN and a fully connected capsule layer? #15

Closed lithostark closed 4 years ago

lithostark commented 4 years ago

Hi, I really want to know how the 3D-convolution-based dynamic routing works from the code. In the code it just applies Conv2d without any routing procedure. If so, the proposed 3D dynamic routing is just Conv2d with a different understanding. Could you explain more about the details? Thanks!

brjathu commented 4 years ago

Hi, in early layers conv3d with r=1 rounting can be approximated as covn2d. however we use conv3d rounting in the final module. Please see, https://github.com/brjathu/deepcaps/blob/301c43768306e36001ff7ac12dd25d586620f9a5/deepcaps.py#L51

lithostark commented 4 years ago

Hi, in early layers conv3d with r=1 rounting can be approximated as covn2d. however we use conv3d rounting in the final module. Please see,

https://github.com/brjathu/deepcaps/blob/301c43768306e36001ff7ac12dd25d586620f9a5/deepcaps.py#L51

Hi, so why approximate it with conv2d? You can directly use ConvCapsuleLayer3D, just change routing=3 to routings=1.

brjathu commented 4 years ago

you can, but with our implementation, it was pretty slow to use ConvCapsuleLayer3D at the early parts on the network.

lithostark commented 4 years ago

you can, but with our implementation, it was pretty slow to use ConvCapsuleLayer3D at the early parts on the network.

So how long does it take to train the implementation in your publication? I mean the one using ConvCapsule instead of the Conv2d approximated version. How many GPU do you use?

brjathu commented 4 years ago

It took around 5-6 hours in a single GPU.

lithostark commented 4 years ago

It took around 5-6 hours in a single GPU.

Thank you for all the explaination and information.