Skip to main content
. 2022 Apr 15;8(4):113. doi: 10.3390/jimaging8040113
Algorithm 1 Adam
Input: s0—initial solution, η, β1, β2—learning step sizes,  f
1. set iteration number t to 0
2. initialize the c0 and v0 tensors filled with zeros
3. set ϵ=108
4. while the stop condition is not met do:
5. t=t+1
6. ct=β1×ct1+(1β1)×f(st1)
7. vt=vt1(1β2)×(vt1f2(st1))
8. st=η×ct×(vt+ϵ)1
9. end loop
10. return st