Modulation identification of the transmitted signals remain a challenging area in modern intelligent communication systems like cognitive radios. The computation of the distinct features from input data set and applying machine learning algorithms has been a well-known method in the classification of such signals. However, recently, deep neural networks, a branch of machine learning, have gained significant attention in the pattern recognition of complex data due to its superior performance. Here, we test the application of deep neural networks to the automatic modulation classification in AWGN and flat-fading channel. Three training inputs were used; mainly 1) In-phase and quadrature (I-Q) constellation points, 2) the centroids of constellation points employing the fuzzy C-means algorithm to I-Q diagrams, and 3) the high-order cumulants of received samples. The unsupervised learning from these data sets was done using the sparse autoencoders and a supervised softmax classifier was employed for the classification. The designing parameters for training single and 2-layer sparse autoencoders are proposed and their performance compared with each other. The results show that a very good classification rate is achieved at a low SNR of 0 dB. This shows the potential of the deep learning model for the application of modulation classification.