def get_adamUpdate(self, iterInd, ori_grad, hist_grad, stepsize=0.001, alpha=0.9, fudge_factor=1e-06):
    if (iterInd == 0):
        hist_grad = (hist_grad + (ori_grad ** 2))
    else:
        hist_grad = ((alpha * hist_grad) + ((1 - alpha) * (ori_grad ** 2)))
    adj_grad = np.divide(ori_grad, (fudge_factor + np.sqrt(hist_grad)))
    return ((stepsize * adj_grad), hist_grad)
def get_adamUpdate(self, iterInd, ori_grad, hist_grad, stepsize=0.001, alpha=0.9, fudge_factor=1e-06):
    if (iterInd == 0):
        hist_grad = (hist_grad + (ori_grad ** 2))
    else:
        hist_grad = ((alpha * hist_grad) + ((1 - alpha) * (ori_grad ** 2)))
    adj_grad = np.divide(ori_grad, (fudge_factor + np.sqrt(hist_grad)))
    return ((stepsize * adj_grad), hist_grad)