## 2 CBN-VAE Model Architecture
### Model Structure and Training
After we turn the output to \(\mathbf{O}_{w}^{c}\times\mathbf{O}_{h}\times 1\) where \(\mathbf{O}_{w}^{c}=\mathbf{O}_{w}\times\mathbf{C}_{o}\), the parameters of next convolutional layer convolution kernel should be \(\mathbf{K}_{s}\times 1\times\mathbf{K}_{u}\). Compared with standard convolution, this method can reduce the parameters and computation consumption of \(\mathbf{C}_{o}\) in the layer-width. * Share network parameters. Parameter sharing can be divided into two aspects: one is the parameter sharing of the convolution kernel in the layer-width; and the other is the undirected \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**No** & **Layer Name** & **Kernel Size** & **Activation Function** & **No. of Parameters** & **Output Size** \\ \hline \multicolumn{5}{c}{_Encoder_} \\
1 & D-CRBM & \(12\times 1\times 24\) & ReLU & 312 & \(120\times 1\times 1\) \\
2 & D-CRBM & \(9\times 1\times 12\) & ReLU & 120 & \(84\times 1\times 1\) \\
3 & Max-pooling (\(2\times 1\)) & – & – & – & \(42\times 1\times 1\) \\
4 & D-CRBM & \(5\times 1\times 12\) & ReLU & 72 & \(54\times 1\times 1\) \\
5 & D-CRBM & \(3\times 1\times 12\) & ReLU & 48 & \(108\times 1\times 1\) \\
6 & Max-pooling (\(2\times 1\)) & – & – & – & \(54\times 1\times 1\) \\
7 & Fully Connected & \(54\times 27\) & ReLU & 1485 & \(27\times 1\) \\
8 & Fully Connected & \(27\times 5\) & ReLU & 140 & \(5\times 1\) \\
9 & Fully Connected & \(27\times 5\) & ReLU & 140 & \(5\times 1\) \\ \hline \multicolumn{5}{c}{_Decoder_} \\
10 & Fully Connected & \(5\times 27\) & ReLU & 140 & \(27\times 1\) \\
11 & Fully Connected & \(27\times 54\) & ReLU & 1485 & \(54\times 1\times 1\) \\
12 & Up-pooling (\(2\times 1\)) & – & – & – & \(108\times 1\times 1\) \\
13 & D-CRBM & \(3\times 1\times 12\) & ReLU & 48 & \(54\times 1\times 1\) \\
14 & D-CRBM & \(5\times 1\times 12\) & ReLU & 72 & \(42\times 1\times 1\) \\
15 & Up-pooling (\(2\times 1\)) & – & – & – & \(84\times 1\times 1\) \\
16 & D-CRBM & \(9\times 1\times 12\) & ReLU & 120 & \(120\times 1\times 1\) \\
17 & D-CRBM & \(12\times 1\times 24\) & ReLU & 312 & \(120\times 1\times 1\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Details of layers and parameters used for the CBN-VAE model. graph characteristic of D-CRBM, the parameters between the encoder and decoder networks can be shared. * D-CRBM. Downsampling convolution by using the variable convolution stride and max-pooling. Change the convolution stride can reduce the redundancy caused by the convolution kernel repeated calculation of the same data. The max-pooling operation can further reduce the network redundancy. We built the CBN-VAE model by using Tensorflow, and trained the model with back-propagating (BP) algorithm [33]. Algorithm 1 shows the procedure of the training of the CBN-VAE model. The goal of the training algorithm is to reduce the loss value of the network by iteratively updating the network parameters. It first calculates the reconstructed output of the network through forward propagation and then calculates the network loss based on the loss function. The loss value is used for the calculation of the gradient in back propagation. Finally, it uses this gradient and learning rate to update the parameters. ```
1:Input: A mini-batch of training data set \(\mathbf{S}\), the number of train iteration _iter_, the learning rate \(\alpha\)
2:While\(i<\textit{iter}\)do
3: Compute the reconstructed output through forward propagation
4: Compute the model loss according to (3)
5: Compute the gradient of parameters according to (4)
6: Update parameters according to (5)
7:\(i++\)
8:end
```  
**Algorithm 1**Training of the Stacked CBN-VAE model. For the CBN-VAE model, the goal is to make the model output as close as possible to the model input itself. For the input data and output data of the model, we use the mean-square error to measure the difference:  
\[mse=\frac{\sum_{i=1}^{n}\left(x_{i}-x_{i}^{\prime}\right)^{2}}{n} \tag{1}\]  
where \(x_{i}\) is the input data, \(x_{i}^{\prime}\) is the model output.