|
Algorithm 1 Training algorithm for SAE |
-
Require:
Dateset ;The number of hidden units ; Number of iterations: m
-
Ensure:
Optimization results
-
1.
Initialize the matrix and randomize the bias.
-
2.
Construct // In the encoding process, is the weight matrix between the input layer and the hidden layer, and b is the bias vector generated during encoding.
-
3.
Perform forward propagation to reconstruct : // Encoding process, where is the decoding matrix between the input layer and the output layer, and is the bias vector generated during decoding.
-
4.
Calculate loss.
-
5.
Perform backpropagation to update model parameters.
-
6.
Repeat steps 2–5 m times to output the optimization results and use them as feature vectors of the input vectors to extract higher representations in SAE.
|