We are well aware that Convolution Neural Network(CNN) has outperformed humans in many computer vision tasks. All the CNN based models have the same base architecture of the Convolution layer followed by Pooling layers with intermediate Batch Normalization layers, for normalizing batch in the forward pass and controlling the gradients in the backward pass.

However, there were a couple of drawbacks in CNN primarily the Max Pooling layer as it does not consider the relation between pixel having maximum value and its immediate neighbors. To solve the problem, Hinton comes up with the idea of Capsule Network and an algorithm called “ Dynamic Routing Between Capsules”. Many resources have explained the intuition and the architecture of the model.

In this post, I have explained the implementation details of the model. It assumes a good understanding of Tensors and TensorFlow Custom Layers and Models.

This post has been structured as follows:

  • Essential TensorFlow Operations
  • Capsule Layer Class
  • Miscellaneous Details
  • Results and Feature Visualization

#feature-extraction #tensorflow #capsule-networks #deep-learning #visualization

Implementing Capsule Network in TensorFlow
4.75 GEEK