Skip to main content
. 2021 Jun 12;21(12):4054. doi: 10.3390/s21124054
Algorithm 1: A pseudocode of Adam optimization algorithm
 Algorithm: Adam
 Input: f, w, α, β1, β2
 Output: w*
 Begin
Initialize t=0,m1=0,v1=0
 while not converged do:
t=t+1
gt=wf(wt)
mt+1=β1mt+(1β1)gt
vt+1=β2vt+(1β2)gt2
mt^+1=mt+11β1t,   vt^+1=vt+11β2t
wt+1=wtαmt^+1vt^+1
 end while
 w*=wt
 End Begin