The automatic diagnosis of lung cancer via artificial intelligence faces two hotspot issues: (1) insufficient data and (2) excessive redundant information, which make it difficult for convolutional neural networks (CNNs) to learn discriminative information of lung cancer. In this paper, we present the reconstruction error based implicit regularization method (REbIRM) that regularizes CNNs at the loss layer. During each training iteration, the reconstruction errors introduced by the two-stage discriminative auto-encoder are used to sharpen the generalization ability of deep CNNs by improving the decision boundary. In the application process, the trained deep CNN is used for completing computed tomography (CT) diagnostics. The main clinical benefit of our approach is that it is domain independent, requiring no specialized knowledge, and can therefore be applied to different types of datasets. To the best of our knowledge, this is the first attempt to implicitly regularize CNNs based on the reconstruction errors. Finally, experimental results on three CT image classification datasets show that REbIRM can achieve impressive results and that, in conjunction with Dropout, it obtains the state-of-the-art performance. REbIRM is also robust to the selection of hyper-parameters and only has the sublinear influence on the convergence of deep CNNs. Besides, empirical and theoretical evidence are provided to indicate that REbIRM prefers to converges in a constrained parameter space with flatter minima, which explains why it can generalize to new data. Finally, the nature of REbIRM is further explored through visualization techniques to analyze how it works in training deep CNNs.