# An Efficient Deep Learning Approach for Colon Cancer Detection
## 3 Deep Learning Approach
### The Proposed Approach  
The general schematic view of the proposed methodology is shown in Figure 2. This paper mainly aims to detect the colon cancer from the analysis of histopathological images. Initially, the input histopathological images are rescaling to 180 \(\times\) 180, which decreasing the processing time. These images are then normalized before feeding them into our CNN model and colon cancer detection is performed. While developing our model, we used the validation split technique by dividing the training data to 80% images for train and 20% for validation. In this paper, we tested seven deep architectures with different batches and different layers and then selected the best performance architecture to be our model. The first model consists of 14 layers with a total of 2,031,778 parameters. In this model, we employed one dropout layer with rate of 0.5% and batch size of 8. The second model consists of  
with total parameters of 4,063,138 parameters. In this model, we employed the dropout layer with 0.8% and batch size of 8. The model number 6 consists of 10 layers with total parameters of 7,954,210 parameters. This model is different from the third model in the structure of layers and dropout rate which is 0.8%. The last model consists of 12 layers with total parameters of 4,063,138. This model is different from the third model in the structure of layers and dropout rate which is 0.5%. In this study, we selected the last model as the proposed model, which is achieved the highest accuracy compared to the other models. Figure 1: Visual examples of nine histopathological images from the used dataset (where colon_n refers to normal image and colon_aca refers to an image with colon cancer). Figure 2: General Architecture of the Proposed Approach. The Architecture of the CNN Model  
The model is composed of four convolution blocks, each of which contains a max pool layer. There is a flatten layer on the bottom and a fully connected layer with 256 units on top that is activated by a ReLU activation function. In addition, the dropout layer is added after the flatten layer with a probability of 0.5 and finally SoftMax layer is added for classification. The Adam optimizer [22] and Cross entropy loss function [23] are used for model optimization. The model summary (the output shape of each layer and the parameter number) is shown in Figure 3. To train the model we used a minimum batch equal to 8 and the model stopped after 30 epochs with total of 4,063,138 parameters. The image batch represents the shape as a tensor (8, 180, 180, 3). This is a batch of eight images of the shape 180 \(\times\) 180 \(\times\) 3. The overall architecture of our model with the data flow of each iteration in detail is shown in Figure 4.  
The first convolution layers are used to extract simple and obvious features (called feature map), such as edges in different directions. As we dig deeper into the hidden layers of the network, the complexity of the attributes that must be identified and extracted increases. The purpose of the pooling layer is to reduce the size of the feature maps for reducing the amount of computation necessary and prevent the overfitting state. In our model, we employed max pooling to clear the feature maps in a small window and keep the larger values within each window and reducing the size of the map. Therefore, in the pooling layers, the best values for the attributes that resulted from the convolution layer are extracted. The dense (SoftMax) layer is the final layer in our model, which contains neurons that are fully connected to all nodes from the preceding layer. In this layer, the final classification process occurs. A flattening operation is applied to simplify the input to a vector of attributes and then pass it to the dense layer to predict the output probabilities. We employed the ReLU activation function in all layers to increase the non-linearity, mainly to solve the sigmoid function-induced gradient disappearance problem.