Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Jun 15, 2024
1 parent 6ce7576 commit 70f492c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lion_pytorch/foreach.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(
):
assert lr > 0.
assert all([0. <= beta <= 1. for beta in betas])
assert all([hasattr(torch, attr) for attr in ('_foreach_mul_', '_foreach_add_', '_foreach_sign_', '_foreach_lerp_')]), 'this version of torch does not have the prerequisite foreach functions'
assert all([hasattr(torch, f'_foreach_{attr}_') for attr in ('mul', 'add', 'sign', 'lerp')]), 'this version of torch does not have the prerequisite foreach functions'

self._init_lr = lr
self.decoupled_wd = decoupled_weight_decay
Expand Down

0 comments on commit 70f492c

Please sign in to comment.