## 2 Near-Term Rainfall Deep Learning Model
### Weighted Combination of Multiple Loss Functions  
To ensure that both the generator and discriminator are updated properly, this model employs the hinge loss [30] as the loss function for the STD-TranslatorNet network. By optimizing this objective function, the Kullback-Leibler (KL) divergence is essentially minimized. The function is defined as:  
\[V_{D}\big{(}\hat{G},D\big{)}=E_{x\sim q_{data}(x)}[\min(0,-1+D(x))]+E_{z\sim p (z)}\big{[}\min\big{(}0,-1-D\big{(}\hat{G}(z)\big{)}\big{)}\big{]} \tag{2}\]  
\[V_{G}\big{(}G,\hat{D}\big{)}=-E_{z\sim p(z)}\big{[}\hat{D}(G(z))\big{]} \tag{3}\]  
In tasks involving the prediction of image sequences, simply minimizing the mean squared error (MSE) between predicted and actual values does not necessarily ensure that the final results closely match the real values. This is one of the reasons why image sequence prediction tasks are more complex compared to other image generation tasks. To effectively penalize the model, this approach combines multiple loss functions with weighted contributions. The L1 norm and L2 norm directly capture the differences between pixel values and are among the most direct loss functions for measuring pixel-level disparities in images.  
\[L_{1}\big{(}y^{\prime},y\big{)}=\frac{\sum_{t=0}^{T-1}\sum_{i=0}^{H-1}\sum_{j =0}^{W-1}\lvert y^{\prime}_{t}(i,j)-y_{t}(i,j)\rvert}{T\mathsf{W}H} \tag{4}\]  
\[L_{2}\big{(}y^{\prime},y\big{)}=\frac{\sum_{t=0}^{T-1}\sum_{i=0}^{H-1}\sum_{j =0}^{W-1}\left(y^{\prime}_{t}(i,j)-y_{t}(i,j)\right)^{2}}{T\mathsf{W}H} \tag{5}\]  
Figure 7: Schematic of 3D convolution.  
In Equations (4) and (5), T represents the length of the image sequence, while H and W denote the height and width of the image, respectively, \(y_{t}^{\prime}(i,j)\) refers to the pixel value at position \((i,j)\) in the predicted image at time \(t\), and \(y_{t}(i,j)\) refers to the pixel value at position \((i,j)\) in the ground truth image at time \(t\).  
To enhance image generation quality, this model uses the SSIM (structural similarity) loss [31] function to penalize image brightness, contrast, and structure.  
\[SSIM(y,y^{\prime\prime})=\frac{\Big{(}2\mu_{y}\mu_{y^{\prime\prime}}+c_{1} \Big{)}\Big{(}2\sigma_{yy^{\prime\prime}}+c_{2}\Big{)}}{\Big{(}\mu_{y}^{2}+\mu _{y^{\prime\prime}}^{2}+c_{1}\Big{)}\Big{(}\sigma_{y}^{2}+\sigma_{y^{\prime \prime}}^{2}+c_{2}\Big{)}} \tag{6}\]  
In Equation (6), \(y\) represents the real image, \(y^{\prime\prime}\) represents the predicted image, \(\mu_{y}\) and \(\mu_{y^{\prime\prime}}\) are the means of \(y\) and \(y^{\prime\prime}\), \(\sigma_{y}^{2}\) and \(\sigma_{y^{\prime\prime}}^{2}\) are the variances of \(y\) and \(y^{\prime\prime}\), \(\sigma_{y^{\prime\prime}}^{2}\) is the covariance of \(y\) and \(y^{\prime\prime}\), and \(c_{1}\) and \(c_{2}\) are constants used to maintain stability. Generally, SSIM values range between \(-1\) and \(1\), with higher values indicating greater similarity between two images. Since a lower value of the loss function is better, SSIM is used as a loss function by taking \(1-\)SSIM.  
The final loss function for the discriminator remains unchanged, while the generator's loss function is defined as a weighted combination of multiple loss functions, as shown in Equation (7):  
\[Loss_{\mathbb{G}}=\alpha\times L_{1}+\beta\times L_{2}+\gamma*(1-SSIM)+\lambda \times V_{\mathbb{G}}\big{(}G,\bar{D}\big{)} \tag{7}\]