## 2 Methods
### Convolutional-Neural-Network-Based Model  
A convolutional neural network (CNN) is a type of feedforward neural network involving convolution calculations and depth structure. Its algorithm is representative of deep learning because of its simple structure, few parameters, and excellent performance in large-scale image processing. CNNs have been widely used in image segmentation, target recognition, image classification, and other fields.  
Deep Coral was proposed by [PERSON] and [PERSON] in 2016 [PERSON] and [PERSON] (2016), which is an unsupervised heterogeneous domain-adaptive method. It brings the Coral loss directly into the deep network by constructing a differentiable function and minimizes the difference in learned-feature covariances across domains. The deep Coral method is capable of powerful nonlinear transformations and can be integrated seamlessly into different layers or architectures.  
This study uses a deep Coral architecture based on a CNN to classify the unlabeled borehole image of the target domain based on learning the marked borehole image of the source domain (Figure 4). It is assumed that the processed borehole image of the source and target domains can be expressed as  
\[X_{S}=[x_{S_{1}},\cdots,x_{S_{N}}]\in R^{N_{S}\times F_{1}\times F_{1}\times 3 }, \tag{1}\]  
\[X_{T}=[x_{T_{1}},\cdots,x_{T_{N}}]\in R^{N_{T}\times F_{1}\times F_{1}\times 3 }, \tag{2}\]  
The label of the source domain borehole image can be expressed as  
\[Y_{S}\in R^{N_{S}}, \tag{3}\]  
\(N_{S}\) and \(N_{T}\) are the number of borehole images in the source and target domains, respectively, and \(F_{1}\) and \(F_{2}\) are the width and height of the expanded borehole images in the source and target domains, respectively. The borehole image is an RGB image and has the three bands R, G, and B.  
Next, the preprocessed borehole images are sent to CNN T for feature extraction. The source-domain features \(Z_{S}\), the target domain features \(Z_{T}\), common sample features in the source and target domains are obtained through deep learning, and \(Z_{S}\) and \(Z_{T}\) are extracted into the same subspace. A Rectified Linear Unit (ReLU) function serves as the activation function for all convolutional layers to carry out a particular mathematical operation.  
\[Z_{S}=T(x_{S};\theta_{t}), \tag{4}\]  
\[Z_{T}=T(x_{T};\theta_{t}), \tag{5}\]  
where \(\theta_{t}\) is the network parameter.  
This ReLU function (Figure 5) is  
\[f(x)=\left\{\begin{array}{ll}x,&if\ x>0\\ 0,&otherwise\end{array}\right., \tag{6}\]  
Next, the Coral loss function is introduced to process the extracted features. The Coral loss function reduces the difference between source and target domain features by minimizing the variance matrix between them. Explicitly, it is given by [34]  
\[L_{ Coral}(\theta_{\epsilon})=\frac{1}{4d^{2}}\|C_{S}-C_{T}\|_{F}^{2}, \tag{7}\]  
where \(C_{S}\) and \(C_{T}\) are the covariance matrices of \(Z_{S}\) and \(Z_{T}\), respectively, \(d\) is RGB dimension of the source domain features and target domain features.  
Finally, the feature of the constrained borehole image is classified by using a softmax classifier, and the gradient descent method is used to optimize the entire network. The loss function of the classifier is  
\[L_{pred}(\theta_{t},\theta_{y})=\sum_{i}^{N}-g_{i}lny_{i}, \tag{8}\]  
Figure 4: Deep Coral architecture based on a CNN with a classifier layer.  
Figure 5: ReLU activation function.  
where \(\hat{y}_{i}\) is the virtual label of borehole image \(i\), and \(y_{i}\) is the real label of borehole image \(i\).  
The learned features are input into the classifier for classification, 1900 training iterations are carried out, and the final experimental results of the classification are shown in Figure 6. The classification accuracy of the borehole image in the target domain can reach 86%, which means that most of the structural planes are properly classified.