# A THz Passive Image Generation Method Based on Generative Adversarial Networks
## 2 Methodology
### Network Architecture  
The most direct way to improve network performance includes increasing network depth, but after research by many scholars, it was found that with the deepening of the network, the fitting effect of the model actually declined. This phenomenon is called the network degradation problem. From the perspective of information theory, the possible reason for this phenomenon is due to the existence of the \"data processing inequality\", that is, in the process of forward propagation, as the network deepens, the original image information contained in the feature map will decrease layer by layer. The neural network is not easy to fit the identity map due to nonlinear activation. [PERSON]. [PERSON] et al. [14] proposed the concept of residual learning, which well alleviated the degradation problem of deep networks. The main contribution was to construct a natural identity mapping relationship between neural network layers through the proposed residual module.  
According to the basic idea of residual learning, the detailed structures of the proposed generator and discriminator networks are shown in Figure 2. The numbers above each color block represent the number of output channels.  
In the generator structure, a residual block named \"ResBlock Upsample\" is designed to achieve feature map upsampling and a standard residual block \"ResBlock\" which does not change the size of input feature map. The detailed structures are shown in Figure 3a,b, respectively. The \"ResBlock Upsample\" block includes the convolution layer (Conv), batch normalization (BN) [15] layer, leaky rectified linear unit (LeakyReLU) activation function [16] and deconvolution (Deconv) layer [17]. The output feature map size of each operation is listed next to each color block. The \"\(1\times 1\)\" or \"\(3\times 3\)\" means the kernel size used in the convolution layer. In the \"ResBlock Upsample\" block, a deconvolution layer is used to achieve double upsampling of the input feature map. The dimension of the input random noise vector is set to 256. After the fully connected layer, the input noise is mapped to the initial feature map size of \(8\times 8\). Then, the output image of 256 \(\times\) 256 is obtained after 5 times of the \(2\times\) upsampling process.  
Figure 3: Residual structure in generator. (**a**) “ResBlock Upsample” block. (**b**) Traditional residual block.  
Figure 2: The proposed Res-WGAN-GP module structure.  
In the discriminator, the traditional convolution operation with stride 2 is used to reduce the size of the input feature map. In the discriminator loss function, the gradient penalty term penalizes each sample independently, and the BN layer will introduce correlation between samples. Thus, the BN layer cannot be used in the discriminator. The residual structures used in the discriminator are shown in Figure 4. In addition, in the process of GAN training, the discriminator network is easier to train than the generator. An over optimum discriminator makes the training of the generator harder, and even fail [11]. Therefore, the structure of the discriminator is designed to be simpler.