Dynamic routing algorithm

Now, we will see how the dynamic routing algorithm computes the coupling coefficients. Let's introduce a new variable called , which is just a temporary variable, and is the same as the coupling coefficients . First, we initialize to 0. It implies coupling coefficients between the capsules in the lower layer and capsules in the higher layer are set to 0.

Let be the vector representation of . Given the prediction vectors , for some n number of iterations, we do the following:

  1. For all the capsules in the layer , compute the following:

  1. For all the capsules in the layer , compute the following:

  1. For all capsules in and for all capsules in , compute as follows:

The previous equation has to be noted carefully. It is where we update our coupling coefficient. The dot product implies the dot product between the prediction vectors of the capsule in the lower layer and the output vector of the capsule in the higher layer. If the dot product is high, will increase the respective coupling coefficient , which makes the stronger.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset