The classification of primary lung adenocarcinoma is complex and varied. Different subtypes of lung adenocarcinoma have different treatment methods and different prognosis. In this study, we collected 11 datasets comprising subtypes of lung cancer and proposed FL-STNet model to provide the assistance for improving clinical problems of pathologic classification in primary adenocarcinoma of lung. Samples were collected from 360 patients diagnosed with lung adenocarcinoma and other subtypes of lung diseases. In addition, an auxiliary diagnosis algorithm based on Swin-Transformer, which used Focal Loss for function in training, was developed. Meanwhile, the diagnostic accuracy of the Swin-Transformer was compared to pathologists. The Swin-Transformer captures not only information in the overall tissue structure but also the local tissue details in the images of lung cancer pathology. Furthermore, training FL-STNet with the Focal Loss function can further balance the difference in the amount of data between different subtypes, improving recognition accuracy. The average classification accuracy, F1, and AUC of the proposed FL-STNet reached 85.71%, 86.57%, and 0.9903. The average accuracy of the FL-STNet was higher by 17% and 34%, respectively, than in the senior pathologist and junior pathologist group. The first deep learning based on an 11-category classifier was developed for classifying lung adenocarcinoma subtypes based on WSI histopathology. Aiming at the deficiencies of the current CNN and Vit, FL-STNet model is proposed in this study by introducing Focal Loss and combining the advantages of Swin-Transformer model. © 2023. The Author(s), under exclusive licence to Springer-Verlag GmbH Germany, part of Springer Nature.