Skip to content

Commit 9aea11d

Browse files
committed
refactor: agc
1 parent e74a8d8 commit 9aea11d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pytorch_optimizer/agc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55

66
def agc(p: torch.Tensor, agc_eps: float, agc_clip_val: float, eps: float = 1e-6):
7-
"""Clip gradient values in excess of the unit-wise norm.
8-
:param p: parameter.
9-
:param agc_eps: float.
10-
:param agc_clip_val: float.
7+
"""Clip gradient values in excess of the unit-wise norm
8+
:param p: parameter. parameter
9+
:param agc_eps: float. epsilon
10+
:param agc_clip_val: float. norm clip
1111
:param eps: float. simple stop from div by zero and no relation to standard optimizer eps
1212
"""
1313
p_norm = unit_norm(p).clamp_(agc_eps)

0 commit comments

Comments
 (0)