Added visualization code and p(y | x) alternating with p(x | y) training (which I'm about to get rid of)