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 8380b15 commit 2495180Copy full SHA for 2495180
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,9 +62,9 @@ def __init__(self, skip_channels, pyramid_channels, use_bathcnorm=True):
62
63
64
def forward(self, x, skip):
65
- _, channels, height, weight = skip.shape
+ _, channels, height, width = skip.shape
66
x = F.interpolate(
67
- x, size=(height, weight), mode="bilinear", align_corners=False
+ x, size=(height, width), mode="bilinear", align_corners=False
68
69
if channels != 0:
70
skip = self.skip_conv(skip)
0 commit comments