Automatic gradient descent with generalized Newton's method | Synapse