Skip to main content
. 2023 Jan 29;23(3):1501. doi: 10.3390/s23031501
Algorithm 1 NAdam training algorithm.
  • 1:

    Generate random weights,

  • 2:

    while global error value  ε<error_value do

  • 3:

       Shuffle the training dataset,

  • 4:

       for each batch inside training dataset do

  • 5:

         Compute gradient vector g on the batch,

  • 6:

         Update vector p Equation (3),

  • 7:

         Update vector u Equation (4),

  • 8:

         Rescale vector p^ Equation (5),

  • 9:

         Rescale vector u^ Equation (6),

  • 10:

         Update variable ws^ Equation (7).

  • 11:

         Step = Step + 1,

  • 12:

       end for

  • 13:

       Calculate global error ε,

  • 14:

    end while