## 2 Methodology
### Transfer Learning with Convolutional Neural Network (CNN)  
The prime goal of transfer learning (TL) is to improve the performance of a target task by using the knowledge from a source task. The source and target tasks may be similar or different. In this study, the source and target domains preserve similar types of feature spaces because the data types are similar except for the revolution speed of the bearings. In this study, transfer learning is employed to reduce the overhead of the training network. In practice, TL creates a robust fault diagnosis process [38]. Figure 4 illustrates the TL concept. TL methods depend on machine-learning algorithms for learning the task. In this study, inductive learning is used. In inductive learning, TL is considered as a classifier along with one of the interference algorithms to solve classical classification problem (i.e., neural networks). These interference algorithms, that is, the deep neural networks, can automate the feature selection process through the hidden layers and then classify. In addition, they can preserve  
Figure 4: The left side shows the conventional learning process, while the right side shows the concept of transfer learning (TL). learning and use it for further tasks. Convolutional neural networks (CNNs) have been considered as one of the most effective feed-forward supervised machine-learning networks. One more reason for considering CNN as the deep neural network for this study is that a large-scale CNN has the potential to be the most effective of the deep learning and classical methods. Moreover, using the transferred knowledge obtained from TL, with only a small set of training data, the large-scale CNN can achieve excellent performance in the considered scenarios [33; 34; 38]. A CNN is used to automate the detailed feature selection process for a given set of data, as well as to save the source knowledge for further usage in the target domain. A CNN has a hierarchical construction and collects from several convolutional, subsampling, and fully connected layers. This network makes optimal use of the indigenous connections (instead of fully-connected layers), weight distribution, and spatial or progressive subsampling to achieve invariance of shifting, scaling, and distortion in their inputs [39; 40]. In this study, as TL and CNN are designed together, the learning of the well-trained \(u\) layers are passed to the \(v\) layers of the target network, where \(u<v,v\ =\ u\ +\ 1\), and layer number \(u\ +\ 1\) denotes the output layer or last layer. Thus, the last layer of the target network is trained, providing an accuracy of output based on the learning from the source network [34]. For a mathematical, intuitive overview of the CNN, let \(P\) and \(Q\) be the input and output vectors, respectively, for the network. The model has three layers--input, hidden and output layers--where the hidden vector is \(H\). The feed forward method is as follows:  
\[H\ =\ \sigma(\text{w}_{1}P\ +\ b_{1}) \tag{5}\]  
\[Q\ =\ \sigma(\text{w}_{2}H\ +\ b_{2}) \tag{6}\]  
\[\sigma(\text{x})=\frac{1}{1\ +\ e^{-x}} \tag{7}\]  
where \(w_{1}\) is the weight matrix between the input and hidden layers, \(w_{2}\) is the weight matrix between the hidden and output layers, \(b_{1}\) and \(b_{2}\) represent the bias vector of the hidden and output layers, respectively, and \(\sigma(. )\) is the sigmoid activation function. The loss function is as follows:  
\[F_{L}\ =\ \frac{1}{n}\underset{i=1}{\overset{n}{\underset{i=1}{\sum}}}||\text{ m}_{i}.\ln\text{Q}_{i}\ +\ (1\ +\ m_{i}).\ln(1\ -\ \text{Q}_{i})|| \tag{8}\]  
where \(m_{i}\) represents the target vector and \(n\) denotes the number of training samples. The aim of the CNN is to minimize the loss function \(F_{L}\) through back propagation and gradient descent [33]. In this study, the architecture of the neural network contains nine layers along with one output layer (see Figure 5). From the convolution layer output, the max-pooling layer does the subsampling of data.