Cancer is a disease with many causes. It is caused by a complicated interaction between genes and the environment. A person's particular genetic makeup may increase his risk of developing cancer. According to World Health Organization statistics, cancer is the top cause of death worldwide. There have been recorded instances of a certain genetic illness. Thus, a proper understanding of eco-genomics is essential in order to assess the underlying cause and risk factors for cancer. Pathology is the core of cancer treatment. Pathology photographs illustrate the histomorphological traits of tumors in detail. To manually identify and classify tumor locations in pathology images, however, requires a great deal of effort and discretion. Using machine learning techniques, one can construct an automated tumour region recognition system for lung cancer pathology images. As customized cancer treatment needs precise biomarker evaluation, the need for precision in histopathologic cancer diagnosis increases. With the help of digital image analysis, histomorphological evaluation could become more accurate and have a wider range of uses. Today, machine learning, especially deep learning, has helped computational pathology grow quickly. Using machine learning in traditional healthcare will be a turning point for the field over the next 10 years, and histopathology will be at the forefront of this change. Lung cancer is one of the leading causes of death for both men and women in every country. Lung cancer has a significant fatality rate owing to its poor prognosis. With image recognition and data analysis, the computer industry and the medical industry are both moving towards full automation. This study wants to find out how accurate the CNN model is so that lung cancer can be found early and maybe many lives can be saved. This study found that the adamax of categorical-cross entropy is about 0.94, which is more accurate than the results from other studies that used different methods.