In CT images, the shape and size of lung nodules are often used to diagnose lung cancer. However, the distinction between benign and malignant nodules is of great significance for the treatment of diseases. In order to solve the problems of low classification accuracy and high false positives in traditional lung nodule diagnosis methods, this paper innovatively designs a dual-path lung nodule classification network model (DPN-AT) that introduces an attention mechanism. The model combines the advantages of residual networks and densely connected networks, which can extract low-level information from high-latitude features, improve the fitting ability of the model, reduce the number of model parameters, and shorten the training time of the model. By introducing an attention mechanism to characterize the dependency between feature channels and adaptively adjust the importance of features. Using the algorithm in this paper to experiment on the LIDC-IDRI data set, the experimental analysis results show that the average accuracy of the DPN-AT algorithm reaches 94.53%, which is better than the average accuracy based on the DPN classification algorithm. In addition, it also has obvious advantages in terms of the time consumption of the classification algorithm. The improved DPN-AT can converge faster and obtain stable results.