# DMLU-Net: A Hybrid Neural Network for Water Body Extraction from Remote Sensing Images
## 2 Proposed Method
### DMLKA Module
On each branch, the initial weights are generated through two \(1\times 1\) convolution layers, and the initial weights are normalized using Softmax and T (a temperature parameter) to generate dynamic weight parameters \(w_{i}\) for the corresponding branch. The calculation formula can be expressed as follows:  
\[w_{i}=\text{softmax}(\frac{weight(x)}{T}) \tag{3}\]  
Figure 2: Structure schematic of the DMLKA module. Here, \(w_{i}\) represents the dynamic weight corresponding to the \(i\)-th group of features \(X_{i}\); _weight_ represents the generated initial weight; and T is the temperature parameter, which controls the weight distribution (a smaller T makes the weights more concentrated). The dynamic weight allocation aggregation dynamically adjusts the weights of different branches according to the input features, enabling the model to automatically select the optimal local feature response by dynamically adjusting the attention map in different scenarios, thereby avoiding potential blocky artifacts and improving the feature representation ability. The temperature parameter T plays a key role in this process. T can adjust the output distribution characteristics of the Softmax function, thereby controlling the smoothness and sharpness of dynamic weights. Not only can this mechanism enhance the flexibility and robustness of the module to different input features and task requirements, but it can also effectively alleviate the instability of weight distribution in the early training stages, thereby improving the convergence performance and final effect of the model. Specifically, when the temperature T is large (T = 1.0), the Softmax output tends to be more uniform, leading the network to average and integrate features across all scales. This behavior facilitates the utilization of multi-scale contextual information during the early stages of convergence and enhances the model's stability and generalization capability. However, an excessively high temperature may hinder the model's ability to emphasize the most relevant scale responses in specific scenarios, thereby limiting its capacity to accurately model target structures. Conversely, when T is small, the Softmax distribution becomes more \"sharp\", meaning that the model is biased toward features from a dominant scale. This enhances its sensitivity to the specific target scale and is particularly advantageous in scenarios where a single-scale representation of water bodies is prominent. Nevertheless, an overly low temperature may lead to overfitting or a reduced adaptability to scale variation, ultimately impairing generalization performance. Finally, the outputs of MLKA are weighted and calculated according to the corresponding generated dynamic weights, and then they are concatenated with the results obtained using the residual network composed of a point convolution layer and the original data to obtain the total output of the DMLKA module. In the process of remote sensing image processing, the organic combination of each function in the DMLKA module supports the model's ability to capture multi-scale features.