In this study, we use a ResNet50 deep learning model with a lightweight attention mechanism to solve the image classification problem, especially in medical pathology tissue images and limited-scale datasets. Our model integrates the lightweight attention mechanism and the dropout layer to substantially improve the feature recognition and classification performance. Experimental results show that our model outperforms traditional models, modern visual transformers and large-scale models in terms of precision, accuracy, recall, F1 score and GMean. It is worth mentioning that our model also exhibits advantages in convergence speed. These results fully demonstrate the excellent performance of our model and lay a solid foundation for its application in real image classification tasks.