BayesianAttentionModules: Appendix AAlgorithm