Skip to main content
. 2022 Aug 23;22(17):6344. doi: 10.3390/s22176344
Algorithm 1. EM algorithm
Procedure EM algorithm returns activation and pose of the capsules in layer l + 1 based on activations and poses of capsules in layer l. Vijh is the hth dimension of the vote from capsule i with activation ai in layer l to capsule j in layer L + 1. mjh is the hth dimension of the pose from capsule j. Rij is initialized to 1Il+1.
M-STEP for one higher-level capsule
Rij=aiRij, iIl
mjh=iRijVijhiRij, h
σjh2=iRijVijhiRij, h
costh=γu+logσjhiRij
aj=logisticργvhcosth
E-STEP for one lower-level capsule
pj=1h2πσjh2ehVijhmjh22σjh2, jIl+1
Rij=ajpjnIl+1anpn, jIl+1