Skip to main content
. 2019 Jun 27;19(13):2854. doi: 10.3390/s19132854

Table 3.

Dynamic routing algorithm.

Routing Algorithm
1: Procedure ROUTING (uj|i, r, I)
2:  For all capsule i in layer I and capsule j in layer (I +1): bij ← 0
3:  FOR r iterations DO
4:   for all capsule i in layer I: ci ← sotftmax(bi)
5:   for all capsule j in layer (I +1): sjicijuj|i
6:   for all capsule j in layer (I +1): vj ← squash(sj)
7:   for all capsule i in layer I and capsule j in layer (I +1): bijbij + uj|i.vj
8:  Return vj