The training algorithm and inference procedure in comments