css implementation of wake-sleep algorithm trained on small black-and-white image data