Despite the recent advances on intelligent data-driven machinery fault diagnostics, large amounts of high-quality supervised data are mostly required for model training. However, it is usually difficult and expensive to collect sufficient labeled data in real industries, and the difficulty in data preparation significantly hinders the application of the intelligent diagnostic methods. In order to address the data sparsity issue with insufficient labeled data, a deep learning-based fault diagnosis method is proposed in this study, exploring additional unsupervised data which are generally easy for collection. A three-stage training scheme is adopted, i.e. pre-training, representation clustering and enhanced supervised learning. The auto-encoder structure is used for feature extraction, and distance metric learning and k-means clustering method are integrated in the neural network architecture for unsupervised learning. Two rotating machinery datasets are used for validations. The proposed method not only achieves promising diagnostic performance on the semi-supervised learning tasks with few labeled data, but also is well suited for pure unsupervised learning problems. The experimental results suggest the proposed method offers a promising approach on exploiting unsupervised data for fault diagnostics.