We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2be1124 commit 3ac1ca8Copy full SHA for 3ac1ca8
segmentation_models_pytorch/decoders/upernet/decoder.py
@@ -36,10 +36,10 @@ def __init__(
36
)
37
38
def forward(self, x):
39
- _, _, height, weight = x.shape
+ _, _, height, width = x.shape
40
out = [x] + [
41
F.interpolate(
42
- block(x), size=(height, weight), mode="bilinear", align_corners=False
+ block(x), size=(height, width), mode="bilinear", align_corners=False
43
44
for block in self.blocks
45
]
@@ -62,10 +62,8 @@ def __init__(self, skip_channels, pyramid_channels, use_bathcnorm=True):
62
63
64
def forward(self, x, skip):
65
- _, channels, height, weight = skip.shape
66
- x = F.interpolate(
67
- x, size=(height, weight), mode="bilinear", align_corners=False
68
- )
+ _, channels, height, width = skip.shape
+ x = F.interpolate(x, size=(height, width), mode="bilinear", align_corners=False)
69
if channels != 0:
70
skip = self.skip_conv(skip)
71
x = x + skip
0 commit comments