# Deep Learning-Based FSS Spectral Characterization and Cross-Band Migration
## 3 Cross-Band Transfer Learning for FSS  
The conclusions drawn in the previous section can be used to realize cross-band transfer learning for FSS. The millimeter-band FSS model determined by Table 4 was adopted, i.e., the width of the small square grid encoded by the FSS was enlarged by 100 times from 5 um to 0.5 mm. The number of small squares in each cycle unit was kept 16 \(\times\) 16. The corresponding frequency of the incident electromagnetic wave was narrowed by 100 times from 0.5-3 THz to 5-30 GHz. Its corresponding wavelength was enlarged by 100 times, keeping the cycle length comparable to that of the FSS. In addition, the substrate high-resistance silicon was changed to FR-4 commonly used in the microwave band, which had a relative dielectric constant of 4.3 and a substrate thickness of 1 mm. Using a combination of MATLAB and COMSOL simulations, 26,000 sets of data in the THz band and 6000 sets were collected in the microwave band. The structure of the convolutional neural network is shown in Figure 8. The input \"image\" was a 16 \(\times\) 16 \"0/1\" matrix. The output was a 1 \(\times\) 126 predicted spectral curve. The structure was mainly composed of two parts. They were the \"convolution-pooling\" part, which was used to extract image features, and the \"fully connected\" part, which was used to output the spectral curve. The loss function MSE is [29]:  
\[MSE=\frac{1}{2}\sum_{i=1}^{N}\left(T_{i}^{\prime}-T_{i}\right)^{2} \tag{3}\]  
where \(T_{i}^{\prime}\) is the CNN prediction result, \(T_{i}\) is the COMSOL simulation result, and \(N\) is the number of frequency points. The convolutional neural network in the THz band trained the neural network from random initialization, while the CNN in the millimeter band trained the neural network using transfer learning on the basis of the former. According to the previous analysis, the same FSS coding matrix had similar spectral properties in different electromagnetic wave  
Figure 8: Schematic of Convolutional Neural Network Transfer Learning. bands when certain conditions were satisfied. When transfer learning is used to train the neural network, the convolutional part used to extract the coding features should be frozen and the fully connected part should be retrained. The other training details were exactly the same for both. During the training process of the neural network, the Adam adaptive gradient descent algorithm was used to update the weights. The initial learning rate was set to 0.001. The exponential decay was used to adjust the learning rate, i.e., the learning rate decreased to the original 0.5 every 5 rounds:  
\[LearnRate=0.001\times 0.5|epoch/5] \tag{4}\]  
where _LearnRate_ is the learning rate corresponding to each round of training and _epoch_ is the number of rounds of training. A total of 80% of the dataset was the training set and 20% was the test set. The training process is shown in Figure 9. Figure 9a shows the training process of the THz-band CNN. After 20 rounds of training, the error of the test set tends to be stabilized. Total training time was 18 min. Figure 9b is the training process of the millimeter-band CNN. Due to the reduction of the data volume, the total training time was only 1.5 min, much lower than the former. After the training was completed, two neural networks were validated using their respective test sets and the neural network outputs were compared with the COMSOL simulation results. Their objective evaluation results are shown in Table 5. \(MAE\) is the mean absolute error, \(RMSE\) is the root mean square error, and \(R^{2}\) values range from 0 to 1, which is used to describe the degree of fitting between them.