Skip to content

Commit dece8c0

Browse files
committed
fix: validate_positive
1 parent 7c61008 commit dece8c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytorch_optimizer/base/optimizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def validate_non_negative(x: float, name: str):
232232

233233
@staticmethod
234234
def validate_positive(x: Union[float, int], name: str):
235-
if x < 1:
235+
if x <= 0:
236236
raise ValueError(f'[-] {name} must be positive')
237237

238238
@staticmethod

0 commit comments

Comments
 (0)