Skip to content

Commit 5a1a8f1

Browse files
authored
Speedup Segformer decoder (#998)
1 parent 05b48d5 commit 5a1a8f1

File tree

1 file changed

+1
-1
lines changed
  • segmentation_models_pytorch/decoders/segformer

1 file changed

+1
-1
lines changed

segmentation_models_pytorch/decoders/segformer/decoder.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def forward(self, x: torch.Tensor):
1515
batch, _, height, width = x.shape
1616
x = x.flatten(2).transpose(1, 2)
1717
x = self.linear(x)
18-
x = x.transpose(1, 2).reshape(batch, -1, height, width).contiguous()
18+
x = x.transpose(1, 2).reshape(batch, -1, height, width)
1919
return x
2020

2121

0 commit comments

Comments
 (0)