single layer between the normal neural network part and BDNN part, by which the two different neural networks are combined.

![image](HybridBDNN.eps){width="70.00000%"}

The basic function of the normal neural network part is the same with the conventional networks (inner product and activation function); the basic funtion of BDNN is just introduced above. Consequently, the forward propagation can be conducted in both the normal neural network and the BDNN part. The remaining problem is the transition part. If we define the basic function of the transition part, then we can conduct the forward propagation of the whole hybrid-BDNN.

As shown in Fig.\[HybridBDNN\], assume that $\bm{\vec g}=(g_1,g_2,...,g_n)$ are the input neurons of the transition part and the $(x_1,x_2,x_3...)$ are the output neurons. As mentioned above, $\bm{\vec g}$ belongs to the normal neural network part, thus it is all real number. The $(x_1,x_2,x_3...)$ belongs to the BDNN part, so they are all binary values. Let $t$ denote the basic function of transition part, if we take $x_1$ as example and $\bm{\vec w}=(w_1,w_2,...,w_n)$ are the corresponding weights, then we obtain $$t(\bm{\vec g},\bm{\vec w}) = x_1.$$ Obviously, in order to calculate with $\bm{\vec g}$, the $\bm{\vec w}$ is also real number. Then we define $t$ as 