Glaucoma is an eye disease that damages the optic nerve head (ONH) causing loss of vision. Therefore, early diagnosis and treatment are important in preventing possible blindness caused by glaucoma. Its current identification is based on the manual segmentation of the optic cup and disc to examine the cup-to-disc ratio (CDR). However, experts' annotation of these regions is a rather difficult and tedious task. Employing a convolutional neural network (CNN) for diagnosing glaucoma could be an alternative solution. However, its performance depends on the availability of a large number of labeled samples for the training phase. This paper presents an automatic glaucoma diagnosing framework based on three convolutional neural network (CNN) models with different learning methods, and compares the performance of these models with ophthalmologists. We use transfer and semi-supervised learning methods based on both labeled and unlabeled data. First, the transfer learning model starts with a pre-trained CNN model that was trained with non-medical data and fine-tunes it with our labeled data. Secondly, a semi-supervised framework is developed and trained using both labeled and unlabeled data based on two different unsupervised methods. The experimental results using two datasets, RIM-ONE and RIGA, demonstrate the efficacy of deep learning models when applied to glaucoma, which is a promising step towards automated screening for identifying individuals with early-stage glaucoma. Compared with annotations by two ophthalmologists, all the presented models achieve better performances, demonstrating the capability of artificial intelligence in diagnosing glaucoma with a high level of reliability.INDEX TERMS Deep Learning, semi-supervised learning, glaucoma, transfer learning, autoencoder.