Skip to content

Commit 4ba86bc

Browse files
committed
yet another mistake for adopt
1 parent 661aed2 commit 4ba86bc

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

adam_atan2_pytorch/adopt.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ def step(
8787
state['steps'] += 1
8888
continue
8989

90-
# logic
91-
92-
steps += 1
93-
9490
# calculate m
9591

9692
grad_sq = grad * grad
@@ -109,6 +105,6 @@ def step(
109105

110106
# increment steps
111107

112-
state['steps'] = steps
108+
state['steps'] += 1
113109

114110
return loss

adam_atan2_pytorch/adopt_atan2.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,6 @@ def step(
9090
state['steps'] += 1
9191
continue
9292

93-
# logic
94-
95-
steps += 1
96-
9793
# calculate m
9894

9995
grad_sq = grad * grad
@@ -112,6 +108,6 @@ def step(
112108

113109
# increment steps
114110

115-
state['steps'] = steps
111+
state['steps'] += 1
116112

117113
return loss

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "adam-atan2-pytorch"
3-
version = "0.1.8"
3+
version = "0.1.9"
44
description = "Adam-atan2 for Pytorch"
55
authors = [
66
{ name = "Phil Wang", email = "lucidrains@gmail.com" }

0 commit comments

Comments
 (0)