From 5892a6ede8eb21a581608482f71788ec04daaae9 Mon Sep 17 00:00:00 2001 From: devzhk Date: Mon, 6 Jun 2022 17:00:49 -0700 Subject: [PATCH] 0.4.5 fix the bug in the case of nstep=1 in CG --- setup.cfg | 2 +- src/CGDs/cgd_utils.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 1aff517..193e6f2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = CGDs -version = 0.4.4 +version = 0.4.5 author = Hongkai Zheng author_email = devzhk@gmail.com description = Adaptive Competitive Gradient Descent optimizer diff --git a/src/CGDs/cgd_utils.py b/src/CGDs/cgd_utils.py index 9ff2fa8..cad27df 100644 --- a/src/CGDs/cgd_utils.py +++ b/src/CGDs/cgd_utils.py @@ -165,7 +165,6 @@ def general_conjugate_gradient(grad_x, grad_y, rebuild=rebuild).mul_(lr_x) Avx = x + h2 r = b.clone() - Avx - nsteps -= 1 if grad_x.shape != b.shape: raise RuntimeError('CG: hessian vector product shape mismatch')