## 2 Method
### CNN Structure  
In general, the input and output of a one-dimensional convolutional neural network are one-dimensional vectors. Due to the difference in the observation instruments and processing methods of the ATEM data, the length of the secondary electromagnetic response signal sequence used for the final inversion may be different. In addition, the ATEM data are affected by coil height and attitude, so the length of the input vector of the one-dimensional convolutional neural network is not fixed. In this paper, we propose a one-dimensional convolutional neural network structure construction method for ATEM data inversion, as shown in Figure 1.  
The input and output of the network structure, as well as the number of layers of the network, are variable and can be changed according to the actual situation to adapt to different measurement systems. The input of the network is a one-dimensional vector with the length of \(n\), which can be formed by combining the electromagnetic response signal of the secondary field with relevant parameters, such as the height and attitude of the transmitting coil, which are optional. The output of the network is a one-dimensional vector with the length of \(m\), corresponding to the conductivity value of the underground \(m\)-layer medium. The network structure between input and output is composed of two parts. The first part is composed of multiple convolutional layers and pooling layers, wherein the kernel size of each convolutional layer is 2, the stride is 1, and the filters for each convolutional layer are different. The filters for the first convolutional layer are \(k\), and the filters for the other convolutional layers are twice that of the previous layer, and each convolutional layer is followed by a max pooling layer. The pooling size of each max pooling layer is 2, and the stride is 1. After several convolution and pooling layers, an \(n^{\prime}\times k^{\prime}\) matrix output is finally formed as the input of the second part. The second part consists of multiple convolutional layers, the filters for each convolutional layer are half of the previous layer, the kernel size is 2, and the stride is 1. Similarly, after several convolutions, an \(n^{\prime\prime}\times k^{\prime\prime}\) matrix is finally formed, and the output \(m\times 1\) of the network is obtained via flattening. In addition, the activation function is an important element of the neural network. Rectified linear unit (ReLU) is a typical activation function for CNN structures, but the problem of neurons not being activated may occur. Therefore, in this paper, the Leaky ReLU function [27] is selected as the activation function in each convolution layer. During network training, the Adam optimization algorithm [28] is used to optimize the solution, and the network structure is adjusted using dropout regularization technology.  
Figure 1: One-dimensional convolutional neural network structure for ATEM data inversion.  
Finally, the root mean square error (RMSE) is used to evaluate the performance of the one-dimensional CNN algorithm proposed in this paper. The RMSE between the inversion model \(m^{I}\) and the synthetic model \(m^{S}\) for \(M\) data points is formulated as follows:  
\[\text{RMSE}=\sqrt{\frac{1}{M}{\sum_{i=1}^{M}}\big{(}m_{i}^{I}-m_{i}^{S}\big{)}^{ 2}} \tag{1}\]