Skip to content

Commit

Permalink
facepalm
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Nov 22, 2024
1 parent 57ffaf3 commit 0177579
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions adam_atan2_pytorch/adopt.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ def step(

next_m = grad.div(v.sqrt().clamp(min = eps)) # they claim that a max(value, eps) performs better than adding the epsilon

if steps > 1:
m.lerp_(next_m, 1. - beta1)
m.lerp_(next_m, 1. - (beta1 * int(steps > 1)))

# then update parameters

Expand Down
3 changes: 1 addition & 2 deletions adam_atan2_pytorch/adopt_atan2.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ def step(

next_m = grad.atan2(b * v.sqrt())

if steps > 1:
m.lerp_(next_m, 1. - beta1)
m.lerp_(next_m, 1. - (beta1 * int(steps > 1)))

# then update parameters

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "adam-atan2-pytorch"
version = "0.1.6"
version = "0.1.7"
description = "Adam-atan2 for Pytorch"
authors = [
{ name = "Phil Wang", email = "[email protected]" }
Expand Down

0 comments on commit 0177579

Please sign in to comment.