Thoracic diseases are serious health problems that plague a significant amount of people. Chest X-ray is currently one of the most popular methods to diagnose thoracic diseases and plays an important role in the healthcare workflow. With the success of deep learning in computer vision, a growing number of deep neural network architectures were applied to chest X-ray image classification. However, most of the previous deep neural network classifiers were based on deterministic architectures which are usually noise-sensitive and are likely to overfit the training data. In this paper, to make a deep architecture more robust to noise and to reduce overfitting, we propose using deep generative classifiers to automatically diagnose thorax diseases from the chest X-ray images. Unlike the traditional deterministic classifier, a deep generative classifier learns a distribution for each input in a middle layer of the deep neural network. A sampling layer then draws a random sample from the distribution and input it to the following layer for classification. The classifier is generative because the class label is generated from samples of a related distribution. Through training the model with a certain amount of randomness, the deep generative classifiers are expected to be robust to noise and can reduce overfitting and then achieve good performances. We implemented our deep generative classifiers based on some well-known deterministic neural network architectures and tested our models on the chest X-ray14 dataset. The results demonstrated the superiority of deep generative classifiers over the corresponding deep deterministic classifiers.