On the Convergence of Adam and Adagrad