## 3 Materials and Methods
### Road Classification Using DAE  
At this stage, the DAE classifier is applied for classification process. DAE is an Auto-Encoder (AE) with one or more hidden layers (HL) [20]. The addition of HLs from a DAE permits the AE to learn further difficult paradigms of mathematical data. For an AE having a single HL, the procedure of mapping an input layer to the HL was the encoder stage. The mapping of the HL to the output layer is the decoder stage. During the DAE with several HLs, encoding and decoding pairs are added. The DAE infrastructure comprises five HLs (collected of three encoding and decoding pairs). The DAE phase starts with the stage in which the primary encoding \((E1)\) encrypts input \(X\), the secondary encoding \((E2)\) encrypts the outcome in \(E1\), and the tertiary encoding \((E3)\) encrypts the outcome in \(E2\). The encoder stage is expressed on the middle layer as \(Z=E3(E2(E1(X)))\).  
In a single HL, the AE vector encoded \(h\) is written as \(h=f(W.X+b)\), whereas \(W\) stands for the weighted matrix, \(b\) denotes the bias vector, and \(X\) indicates the input vector. The vector encoder's purpose in forwarding propagation to HL 1 develops in Equation (4).  
\[h^{(l+1)}=f\Bigl{(}W^{(l)}.h^{(l)}+b^{(l)}\Bigr{)}, \tag{4}\]  
so that in the encoder stage, all of the layers are expressed as \(E1=f(W^{(1)}.X+b^{(1)});E2=f(W^{(2)}).E1+b^{(2)}\); and \(Z=E3=f(W^{(3)}).E2+b^{(3)}\). The decoder stage was applied in the opposite way to the encoder stage: a primary decoder was the last to decode. The last reconstruction stage of the decoded vector outcome was \(\hat{X}=D1(D2(D3(E2(E1(X)))))\). For an AE with single HL, \(\hat{X}=f(W^{T}.h+b^{\prime})\), the decoder function to DAE develops as: \(D3=f((W^{(3)})^{T}.Z+b^{(3)^{\prime}});D2=f((W^{(2)})^{T}.D3+b^{(2)^{\prime}}) ;\hat{X}=D1=f((W^{(1)})^{T}.D2+b^{(1)^{\prime}})\), whereas \(f\) refers to the node activation function (AF) utilized on all the layers. The AF \(f\) on NN neurons is a mathematical purpose carried out to the resultant signal utilized for enabling or disabling neurons. The AF maps resultant values into a chosen range, between \(-1\) and \(1\) or \(0\) and \(1\) (depending upon the AF utilized). Figure 2 depicts the infrastructure of AE.  
The cost function of DAE was the distance function between input and reconstructing \(\hat{X}\). Cost, also called loss, was computed with Mean Square Error (MSE) loss to AF:  
\[J(w,\ b,\ x^{j},\hat{x})=\frac{1}{2}\|x^{i}-\hat{x}\|^{2} \tag{5}\]  
The input data were normalized to between zero and one; afterward, the reconstruction procedure on the resultant layer was conducted with non-linear sigmoid functions. In order to input, either the binary number or the input with a range between zero and one was utilized for binary cross-entropy as loss functions \([4y,n8]\). To the entire train of \(m\) data, \((w,\ b)=\frac{1}{m}\sum_{i=1}^{m}J(w,\ b,\ x^{i},\hat{x}^{i})\). The minimum loss value was computed utilizing the subsequent formula:  
\[J(w,\ b)=\frac{1}{m}\sum_{i=1}^{m}[x^{i}\log\ (\hat{x}^{i})+(1-x^{i})\ \log\ (1-\hat{x})] \tag{6}\]  
Back-propagation (BP) upgraded the biases and weight values of all the nodes from all the layers, for the purpose of decreasing the cost. An optimum cost of the most minimum loss value was nearly 0. Afterward, in the AE trained procedure, the data on the bottleneck (Z) layer was a representation of data from the low dimensional encoder procedure. The encoder infrastructure (Z) was put forward as input to a DNN technique called transfer learning (TL). In TL, the \(Z\)-encoder infrastructure transmitted to AE and the biases and weights values were classified.