Skip to content

Commit 5404b44

Browse files
committed
update: validate_betas
1 parent 979cd5c commit 5404b44

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pytorch_optimizer/base/optimizer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,8 @@ def validate_betas(self, betas: BETAS):
265265
if len(betas) < 3:
266266
return
267267

268-
self.validate_range(betas[2], 'beta3', 0.0, 1.0, range_type='[]')
268+
if betas[2] is not None:
269+
self.validate_range(betas[2], 'beta3', 0.0, 1.0, range_type='[]')
269270

270271
def validate_nus(self, nus: Union[float, Tuple[float, float]]):
271272
if isinstance(nus, float):

0 commit comments

Comments
 (0)