Skip to content

Commit 5455604

Browse files
committed
check for correct foreach fns
1 parent 59a9a31 commit 5455604

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

adam_atan2_pytorch/foreach.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __init__(
3838
assert lr > 0.
3939
assert all([0. <= beta <= 1. for beta in betas])
4040
assert weight_decay >= 0.
41-
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'
41+
assert all([hasattr(torch, f'_foreach_{attr}_') for attr in ('mul', 'add', 'lerp', 'sqrt')]), 'this version of torch does not have the prerequisite foreach functions'
4242

4343
self._init_lr = lr
4444

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.0.7"
3+
version = "0.0.8"
44
description = "Adam-atan2 for Pytorch"
55
authors = [
66
{ name = "Phil Wang", email = "lucidrains@gmail.com" }

0 commit comments

Comments
 (0)