How to generate image using deep learning
DCGAN(Deep convolutioanl GAN) or WGAN can be used to generate images by training them on already existing images. GAN are very tricky to train. DCGAN and WGAN are the techniques that make it somewhat easier. 

A GAN consists of a Generator and a Discriminator. Generator's job is to generate images and Discriminator's job is to predict whether the image generated by the generator is fake or real. If the generator succeeds in fooling the discriminator, we can say that generator has succeeded.

I have generated MNIST images using DCGAN, you can easily port the code to generate dogs and cats images.