Skip to main content
. Author manuscript; available in PMC: 2022 Feb 1.
Published in final edited form as: Med Image Anal. 2020 Nov 5;68:101889. doi: 10.1016/j.media.2020.101889
1: procedure Routing (u^x,ytil,d,l,x,y)
2:  for all capsule types til at position (x,y) and capsule type tjl+1 at position (x, y): btilx,y0.
3: for d iterations do
4:   for all capsule types til  at position (x,y): rtilsoftmax(btil) ⊳softmax computes Eq. 7
5:   for all capsule types tl+1 at position  (x,y):px,ynrtilx,yu^x,ytil
6:   for all capsule types tjl+1 at position (x,y):vx,ysquash(px,y) ⊳ squash computes Eq. 8
7:   for all capsule types til and all capsule types tjl+1:btilx,ybtix,y+u^x,ytilvx,y
return vx,y