Skip to main content
. 2021 Jun 17;10(6):1398. doi: 10.3390/foods10061398
Algorithm 1 Training process of an autoencoder.
Input: Dataset A={ai},aiRKN, the number of hidden units nh and the number of the iterations T, initialize the matrices and biases randomly.
Output: The optimization outcomes.
  • 1:

    fori=1 to T do

  • 2:

       Perform forward propagation to compute r(ai).

  • 3:

       Compute output error by h(ai)r(ai).

  • 4:

       Perform backward propagation to compute Δψ and Δψ.

  • 5:

       Update ψ by ψ=ψ+Δψ and ψ=ψ+Δψ.

  • 6:

    end for