## 2 Materials and Methods
### Transferred Convolutional Neural Network  
Deep learning-based artificial intelligence methods powered by very large datasets and advanced computations have recently shown success in image classification and object recognition [25]. The most successful types of deep learning models for image analysis are DCNNs, which have been applied successfully in objection detection, segmentation and recognition [25]. Unlike traditional pattern recognition techniques, DCNNs function by learning features from a large image database without manually defining extractors [25; 26]. A DCNN contains many layers that transform their input according to local connections, shared weights, and pooling, and subsequently discover representative hierarchical features through several hidden layers [22; 25]. At first, lower-level filters of the neural network learn general features such as edges and shapes from the datasets. Higher-level filters then learn more specific features, such as objects [27]. Works based on DCNNs have been successful in performing several medical image tasks, such as diagnosing fundoscopic images for ophthalmologists [28] and dermatoscopic images of skin cancer for dermatologists, and have shown performances rivaling those of human specialists [29]. In diagnosing disease skin pictures, it has been shown that a DCNN could achieve a performance comparable with that of dermatologists [30]. In digital pathology, a DCNN has been used to increase accuracy, efficiency, and consistency for pathologists [17]. Automated histopathological systems have been reported to be valuable in predicting various diseases for supporting clinical decisions. With the introduction of digital whole-slide images, there is an opportunity to decrease pathologists' workloads and the number of labor-intensity tasks. Some deep learning networks have achieved performances in detecting lymph node metastases that rival those of human pathologists [19]. However, for medical image classification, the number of training samples is generally limited. Collecting and annotating a large number of medical images remains a challenge. Several approaches have been proposed to build models from limited samples without overfitting: training from scratch, using off-the-shelf pretrained DCNN features, unsupervised DCNN pretraining with supervised fine-tuning, and transfer learning, which uses pretrained networks from a very large number of nonmedical, natural image datasets to fine-tune the network [22]. Although medical and natural images show various differences, objects from low-level edges to high-level shapes can be recognized. DCNNs trained from the large, well-annotated ImageNet still achieve good performance on medical image recognition tasks [20]. Transfer learning is now commonly used in various classification tasks for medical images such as Pap smear images and radiologic images [31]. The theory of replacing layers in pre-DCNN architectures has already been suggested to be useful in CAD systems with limited training datasets [20]. Given the amount of available data in this study, using transfer learning for the classification of histopathological images is appropriate. In the experiment, AlexNet was applied to the proposed transfer learning task. AlexNet is a pretrained convolutional neural network based on ImageNet, which consists of over 15 million labeled natural images with over 22,000 categories. AlexNet achieved significantly improved performance over other methods in the ImageNet Large Scale Visual Recognition Challenge (ILSVRC) [26; 32; 33]. The architecture of AlexNet consists of five convolution layers, three pooling layers, and two fully connected layers. To reuse the pretrained network, the final three layers were removed from the AlexNet network and replaced with the target tasks. During the training, image blocks were resized from \(20\times 20\) to \(227\times 227\) pixels to make them compatible with the AlexNet architecture.