Skip to content

Commit 5b8a636

Browse files
committed
fix: neuron_norm
1 parent fa1fece commit 5b8a636

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytorch_optimizer/optimizer/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def matrix_power(matrix: torch.Tensor, power: float) -> torch.Tensor:
179179

180180
def neuron_norm(x: torch.Tensor) -> torch.Tensor:
181181
if x.dim() <= 1:
182-
return x.abs_()
182+
return x.abs()
183183

184184
view_shape = [x.shape[0]] + [1] * (x.dim() - 1)
185185
x = x.view(x.shape[0], -1)

0 commit comments

Comments
 (0)