Adam (C++ AdamOptimizer): per-weight first and second moment estimates
with bias correction by 1 - beta^t, beta^t kept as a running product
(one multiply per training step). Uses the network’s learning rate; the
momentum and acceleration rates do not apply.
Adam::<Q16_16>::default() and Adam::<Q8_8>::default() are the
defaults of tinymind (C++) for those formats: beta1 0.9, beta2 0.99 and epsilon
sqrt(LSB / (1 - beta2)), each rounded to the format. Not the textbook
0.999 and 1e-8: in fixed point (1 - beta2) * g * g rounds to zero for
gradients below that epsilon, and a smaller epsilon then lets steps grow
far beyond the learning rate. Q8.8 has too few fractional bits for Adam
(its default epsilon is 0.625).