Skip to content

Commit

Permalink
0.4.5 fix the bug in the case of nstep=1 in CG
Browse files Browse the repository at this point in the history
  • Loading branch information
devzhk committed Jun 7, 2022
1 parent 4bda067 commit 5892a6e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = CGDs
version = 0.4.4
version = 0.4.5
author = Hongkai Zheng
author_email = [email protected]
description = Adaptive Competitive Gradient Descent optimizer
Expand Down
1 change: 0 additions & 1 deletion src/CGDs/cgd_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 5892a6e

Please sign in to comment.