diff --git a/segmentation_models_pytorch/decoders/segformer/decoder.py b/segmentation_models_pytorch/decoders/segformer/decoder.py index c2970e1f..daa78b37 100644 --- a/segmentation_models_pytorch/decoders/segformer/decoder.py +++ b/segmentation_models_pytorch/decoders/segformer/decoder.py @@ -15,7 +15,7 @@ def forward(self, x: torch.Tensor): batch, _, height, width = x.shape x = x.flatten(2).transpose(1, 2) x = self.linear(x) - x = x.transpose(1, 2).reshape(batch, -1, height, width).contiguous() + x = x.transpose(1, 2).reshape(batch, -1, height, width) return x