User:Jeblad/messy stuff

Here there be messy…
Placeholder…

The pose vector $\mathbf{u}_{i}$ is rotated and translated by a matrix $\mathbf{W}_{ij}$  into a vector $\mathbf{\hat{u}}_{i}$


 * $$\mathbf{\hat{u}}_{i} = \mathbf{W}_{ij} \mathbf{u}_{i}$$

The updates goes as (this is not finished!)

$$\begin{align} b_{ij} & = 0 & \mbox{initialize routing weight for all i,j} \\ \mathbf{c}_i & = \operatorname{softmax}(\mathbf{b}_{i}) & \mbox{limit to range [0,1]} \\ \mathbf{s}_{j} & = \sum{\mathbf{c}_{i}} & \mbox{weighted sum for each capsule in the next layer} \\ \mathbf{v}_j & = \operatorname{squash}(\mathbf{s}_{j}) & \mbox{limit to range [0,1]} \\ b_{ij} & = b_{ij} + \mathbf{\hat{u}}_{j|i} \cdot \mathbf{v}_{j} & \mbox{agreement} \end{align}$$

Because the length of the vectors represents probabilities they should be between zero (0) and one (1), and to do that a squashing function is applied


 * $$\operatorname{squash}(\mathbf{u}) = \frac{\|\mathbf{u}\|^2}{1+\|\mathbf{u}\|^2} \frac{\mathbf{u}}{\|\mathbf{u}\|}$$