## 3 The Deep Learning-Based Approaches
### Training Stage  
After solving the minimum transmit power problem in the optimization stage, we obtained optimal power and PS ratio vectors \(\left\{p_{k},\theta_{k}\right\}\) corresponding to channel vectors \(\left\{\left|h_{ij}\right|\right\}\) with \(i,j\in\mathcal{K}\) and \(\mathcal{K}=1,...,K\). Then, we treat \(\left(\left\{\left|h_{ij}\right|\right\}\right./\left\{p_{k},\theta_{k}\right\}\right)\) as an input/output pair, and try to learn the input/output relation through the training process of the deep learning-based approaches. Assuming that we use \(N\) samples for training data, then, we have input/output pairs \(\left(\left\{\left|h_{ij}^{n}\right|\right\}\right)/\left\{p_{k}^{n},\theta_{ k}^{n}\right\}\) where \(n=1,\ldots,N\).  
With the simple structure of an FFNN, we can use the input/output pairs as above, i.e., \(\left(\left\{\left|h_{ij}^{n}\right|\right\}\right)/\left\{p_{k}^{n},\theta_{ k}^{n}\right\}\), for the training stage of the DNN. The training data is trained by using  
Figure 2: The proposed deep learning-based approach.  
back propagation, and the training stage is implemented based on optimizing the mean squared error (MSE) by using the scaled conjugate gradient algorithm (which is both memory and computationally efficient [43]).  
In the LRN and NARX, when the data are concurrent (matrix format), we need to change it into sequential data (a cell array format) before setting the network parameters because the input appears in time order. The LRN and NARX have a delay in the feedback loop. The feedback loop affects the order of the input, and the output. Therefore, we need to add more data corresponding to the number of delays used, i.e., \(\left(\left\{\left|h_{ij}^{T}\right|\right\}\right)/\left\{p_{k}^{T},\theta_{k }^{T}\right\}\right)\), where \(T\) is the number of delays in each feedback loop. Then, we define input and output pairs for the training stages of the LRN and NARX as follows: \(\left(\left\{\left|h_{ij}^{T}\right|,\left|h_{ij}^{n}\right|\right\}\right)/ \left\{p_{k}^{T},\theta_{k}^{T};p_{k}^{n},\theta_{k}^{n}\right\}\right)\).  
The LRN and NARX are trained by using the scaled conjugate gradient algorithm. After training stage, the MSE can be calculated. With a NARX neural network, firstly, the network is trained in an open loop, like the FFNN, with the scaled conjugate gradient algorithm. After that, the trained network with the open loop is changed to a closed loop in which target values are replaced by feedback signals from the output. Finally, the network is retrained in close loop form.  
Although LSTM works with sequence and time series input data for data prediction, like the LRN and NARX, this network does not have the delays in the input and each feedback loop. Therefore, we also use \(\left(\left\{\left|h_{ij}^{n}\right|\right\}\right)/\left\{p_{k}^{n},\theta_{k }^{n}\right\}\right)\) as input/output data for training. The LSTM network is trained by using the Adam optimization algorithm to update network weights, instead of using the classical stochastic gradient descent method.  
Since the DNN and RNN architectures use backpropagation, we need activation function that calculates its own derivative. In this paper, the following activation functions for hidden layers and output layer are used and given by Equations (6) and (7), respectively.  
\[\textit{tansig}\left(n\right)=\frac{2}{1+e^{-2n}}-1 \tag{6}\]  
\[\textit{purelin}\left(n\right)=n \tag{7}\]