Early diagnosis of lung cancer is critical for improvement of patient survival. Histopathological assessment of tissue is standard procedure needed for early diagnosis. Tissue analysis is usually performed by pathologist review but this procedure is time-consuming and error-prone. Automated detection of cancer regions would significantly speed up the whole process and help the pathologist. In this paper we propose fully automatic method for lung cancer detection in whole slide images of lung tissue samples. Classification is performed on image patch level using convolutional neural network (CNN). Two CNN architectures (VGG and ResNet) are trained and their performance are compared. Obtained results show that CNN based approach has potential to help pathologists in lung cancer diagnosis.