# Improved Performance in the Detection of ACO-OFDM Modulated Signals Using Deep Learning Modules
## 3 Our Proposed DL Detection Models
One of the most important things in DL is to properly tune the hyperparameters of the DL network to enable the receiver to recover the original data bits with minimum loss. In general, DL networks should include an input layer, output layer, and several internal layers. We chose the number of nodes in the input layer to be equal to the number of the received data vectors at the receiver that we wanted to demodulate. The number of the nodes in the output layer must be equal to the number of the generated data bits at the transmitter that we wanted to detect. There is no specific way to decide the  
Figure 4: Our proposed ACO-OFDM decoder 2 using fully convolutional neural network (FCNN) network. Figure 3: Our proposed ACO-OFDM decoder 1 using the fully connected (FC) network. number of internal layers, so we determined by trial and error until we obtained minimum loss. At the input of our system, we normalized the input data to reduce the variance of the input data scaling. This helped accelerate the training process. In the first model, we used a FC network with five layers. The first three layers are FC layers with 512 nodes, and the fourth layer is an FC layer with 256 nodes. In the last layer, we used a convolutional layer with two classes with size \(1\times 1\). Each output node in the last layer detects the recovered bit and decides if it is zero or one, as in Figure 3.  
After each one of the internal layers, which are layers 1 to 4, we use a relu activation function as shown in Equation (12). It is proper for DL in optical communication and is widely used by other researchers:  
\[\mathrm{f_{Relu}(x_{i})}=\mathrm{max}(0,x_{i}). \tag{12}\]  
After the last layer, we use a softmax activation function, given by Equation (13), because softmax activation is an easy function widely used to convert the values of the output data to probabilities between 0 and 1. \[\mathrm{f_{softmax}(x_{i})}=\frac{e^{x_{i}}}{\sum_{j=1}^{k}e^{x_{j}}}, \tag{13}\]  
Then, we use the cross-entropy loss function in (14), which is suitable for detecting a vector of data by minimizing the distance between the original data and the predicted data, where p is the probability of the original data bits and q is the estimated output probability of our DL system which we require to be minimum through the training process. \[\mathrm{H(p,q)}=-\sum_{x_{i}}p(x_{i})\log(q(x_{i})), \tag{14}\]  
The output layer of our model determines the value of each and every bit--if that bit is 0 or 1--by calculating cross entropy loss. This yields a minimum distance loss between the output of the DL system and the original data. In the second model, we use FCNN. The concept is taken from [11], where it is proposed for image segmentation, which means determining whether each pixel in the output image is foreground or background. We used FCNN because the aim of our network is to make a semantic segmentation for each output bit. FCNN includes two processes, a down-sampling process and an up-sampling process. The down-sampling process comprises a number of convolutional and pooling layers used to detect high-resolution information in the image. The up-sampling process is the inverse process of the down-sampling process and comprises a number of de convolutional and up-sampling layers, which are used to extract the precise localization of the extracted data after the down-sampling process. The output layer of the system is a convolution layer that contains two channels: one channel predicts if this pixel is background, and the other predicts if it is foreground. In our FCNN model, we used the concept in [11], but we changed it to be suitable for our problem. Our FCNN model receives input vectors with noise and performs a number of operations on this input vector by two processes, as in the FCNN models: a down-sampling process that comprises a number of convolutional layers with pooling layers in order to interpret the data and then to know the precise localization for the data extracted by the up-sampling process.