From 4ba86bc248f05c4ba1858d459f78601c0874873a Mon Sep 17 00:00:00 2001 From: lucidrains Date: Fri, 22 Nov 2024 07:31:05 -0800 Subject: [PATCH] yet another mistake for adopt --- adam_atan2_pytorch/adopt.py | 6 +----- adam_atan2_pytorch/adopt_atan2.py | 6 +----- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/adam_atan2_pytorch/adopt.py b/adam_atan2_pytorch/adopt.py index 1796af8..0e0ea13 100644 --- a/adam_atan2_pytorch/adopt.py +++ b/adam_atan2_pytorch/adopt.py @@ -87,10 +87,6 @@ def step( state['steps'] += 1 continue - # logic - - steps += 1 - # calculate m grad_sq = grad * grad @@ -109,6 +105,6 @@ def step( # increment steps - state['steps'] = steps + state['steps'] += 1 return loss diff --git a/adam_atan2_pytorch/adopt_atan2.py b/adam_atan2_pytorch/adopt_atan2.py index 350b827..54ce3b7 100644 --- a/adam_atan2_pytorch/adopt_atan2.py +++ b/adam_atan2_pytorch/adopt_atan2.py @@ -90,10 +90,6 @@ def step( state['steps'] += 1 continue - # logic - - steps += 1 - # calculate m grad_sq = grad * grad @@ -112,6 +108,6 @@ def step( # increment steps - state['steps'] = steps + state['steps'] += 1 return loss diff --git a/pyproject.toml b/pyproject.toml index 2823421..8d6eb0c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "adam-atan2-pytorch" -version = "0.1.8" +version = "0.1.9" description = "Adam-atan2 for Pytorch" authors = [ { name = "Phil Wang", email = "lucidrains@gmail.com" }