# Deep Learning-Based Optimization for Maritime Relay Networks
## 3 Relay Network Based on Deep Learning
The \(\tanh\) activation function introduces non-linearity, which is essential for enabling the CNN to learn complex feature mappings. Additionally, the \(\tanh\) function outputs values in the range of \([-1,\,1]\), ensuring smooth transitions between negative and positive inputs, which is beneficial for capturing variations in features such as wave height and navigation direction, thereby enhancing the robustness and stability of the network. ### Sequence Learning Estimator

A training model consisting of a GRU layer and a Dropout layer is defined, where the GRU model contains only two gates, the reset gate and the update gate, and the specific structure is illustrated in Figure 3. Compared to LSTM, the GRU has a simpler architecture, fewer parameters and a faster training speed. The output data from the feature extractor arefed into the GRU, which performs temporal modeling and captures temporal dependencies within the sequential data. The GRU layer processes sequential data using its reset and update gates. At each time step \(t\), the update gate (\(z_{t}\)) determines how much of the previous hidden state (\(h_{t-1}\)) should be retained in the current hidden state, while the reset gate (\(r_{t}\)) decides how much of the past information to forget. The output of the GRU layer is a sequence of hidden states, which encode the temporal dynamics of the input data. The calculations are as follows:

\[z_{t}=\sigma(W_{z}\cdot[h_{t-1},x_{t}]+b_{z}), \tag{27}\]

\[r_{t}=\sigma(W_{r}\cdot[h_{t-1},x_{r}]+b_{r}), \tag{28}\]

\[\tilde{h}_{t}=\tanh(W\cdot[r_{t}*h_{t-1},x_{t}]+b), \tag{29}\]

\[x_{t}=\big{[}v_{1t},v_{2t},v_{3t},\theta_{1t},\theta_{2t},\theta_{3t},L_{1t}, L_{2t},h_{1t},h_{2t},h_{3t},\gamma_{1t},\gamma_{2t}\big{]}. \tag{23}\]0

where \(W\) and \(b\) are weights and bias, \(\sigma\) is the sigmoid activation function and \(\tilde{h}\) is the candidate hidden state, while \(h_{t}\) is the final hidden state, respectively. The hidden states produced by the GRU, specifically the hidden state of the last time step (\(h_{T}\)), are passed through a Dropout layer to prevent overfitting and improve generalization. Dropout randomly sets a fraction of the units in \(h_{T}\) to zero during training, reducing the model's reliance on specific neurons. This prevents the model from overfitting to particular features and encourages better generalization. The resulting feature vector, which encapsulates temporal dependencies from the entire input sequence, is then fed into a fully connected (FC) layer. Finally, accurate classification predictions are achieved through the Softmax classifier. The integration of GRU layers into the model architecture not only accelerates the training process but also enhances the ability to process effective link features extracted by CNNs. By leveraging the spatial feature extraction capabilities of CNNs and the sequential modeling strengths of GRUs, the proposed algorithm captures both the spatial correlations present in the input data and the temporal dependencies across time steps. Specifically, spatial features are extracted through CNN layers and then sequentially passed to the GRU layers, where the temporal dynamics of the data are modeled. This combined architecture allows the model to effectively adapt to the dynamic environment of maritime communication networks. As a result, the algorithm achieves more accurate data modeling and prediction, addressing the challenges posed by real-time communication in complex oceanic environments. \[x_{t}=\big{[}v_{1t},v_{2t},v_{3t},\theta_{1t},\theta_{2t},\theta_{3t},L_{1t}, L_{2t},h_{1t},h_{2t},h_{3t},\gamma_{1t},\gamma_{2t}\big{]}. \tag{23}\]1 Architecture of the GRU. ## 4 Simulation Experiment and Analysis

In deep learning-based relay networks, the acquisition of training data plays a critical role in model training, directly impacting the effectiveness and accuracy of the experiments.