Wake-Sleep and Contrastive wake-sleep. I have no doubts that it's full of bugs, since I still didn't get around to testing it. Just thought I'd upload what I've done so far.