How to modify the Adam optimizer to not include zeros in the calculations? I found an implementation of Adam in this SO question: