Skip to content

Commit 3ec5918

Browse files
committed
Fix spacing misalignment for fast norm path in LayerNorm modules
1 parent 3044b1a commit 3ec5918

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

timm/models/layers/norm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def __init__(self, num_channels, eps=1e-6, affine=True):
5050

5151
def forward(self, x: torch.Tensor) -> torch.Tensor:
5252
if self._fast_norm:
53-
x = fast_layer_norm(x, self.normalized_shape, self.weight, self.bias, self.eps)
53+
x = fast_layer_norm(x, self.normalized_shape, self.weight, self.bias, self.eps)
5454
else:
5555
x = F.layer_norm(x, self.normalized_shape, self.weight, self.bias, self.eps)
5656
return x
@@ -65,7 +65,7 @@ def __init__(self, num_channels, eps=1e-6, affine=True):
6565
def forward(self, x: torch.Tensor) -> torch.Tensor:
6666
x = x.permute(0, 2, 3, 1)
6767
if self._fast_norm:
68-
x = fast_layer_norm(x, self.normalized_shape, self.weight, self.bias, self.eps)
68+
x = fast_layer_norm(x, self.normalized_shape, self.weight, self.bias, self.eps)
6969
else:
7070
x = F.layer_norm(x, self.normalized_shape, self.weight, self.bias, self.eps)
7171
x = x.permute(0, 3, 1, 2)

0 commit comments

Comments
 (0)