Skip to content

Commit 370169c

Browse files
committed
refactor: centralize_gradient
1 parent ed3484a commit 370169c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytorch_optimizer/gc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
def centralize_gradient(x: torch.Tensor, gc_conv_only: bool = False) -> torch.Tensor:
55
"""Gradient Centralization (GC)
6-
:param x: torch.Tensor. gradient.
7-
:param gc_conv_only: bool. 'False' for both conv & fc layers.
6+
:param x: torch.Tensor. gradient
7+
:param gc_conv_only: bool. 'False' for both conv & fc layers
88
:return: torch.Tensor. GC-ed gradient
99
"""
1010
size: int = x.dim()

0 commit comments

Comments
 (0)