I want to experiment with capsule networks on facial expression recognition (FER). For now, I am using fer2013 Kaggle dataset.

One thing that I didn't understand in capsule networks was in the first convolution layer, the size was reduced to 20x20 - having input image as 28x28 and filters as 9x9 with 1 stride. But, in the capsules, the size reduces to 6x6.

How did this happen? Because with the input size as 20x20 and filters as 9x9 and 2 strides, I couldn't get 6x6. Maybe I missed something.

For my experiment, the input size image is 48x48. Should I use the same hyperparameters for the start or are there any suggested hyperparameters that I can use?


After the first Conv layer, the size reduced to 20x20 for the primary caps which is convolutional caps layer n final = (n + 2p -f )/s + 1 which gives a 6x6 output with 256 channels

6x6x256 is further encoded into capsules of 8 dimensions by reshaping the channels i.e. 256/8 = 32 which gives 6x6x32 = 1152 capsules

try experimenting with the same hyperparameters first and then try to encode higher-level features by making suitable changes to the hyperparameters.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.