Skip to content

Commit

Permalink
fix bug for feature size of pst
Browse files Browse the repository at this point in the history
  • Loading branch information
InstructPart committed Apr 15, 2024
1 parent 35abf45 commit ea7c118
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion models/decoders/MambaDecoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,11 @@ def forward_up_features(self, inputs): # B, C, H, W
x = x.permute(0, 2, 3, 1).contiguous() # B, 15, 20, 768
y = layer_up(x) # B, 30, 40, 384
else:
# interpolate y to input size (only pst900 dataset needs)
B, C, H, W = inputs[3 - inx].shape
y = F.interpolate(y.permute(0, 3, 1, 2).contiguous(), size=(H, W), mode='bilinear', align_corners=False).permute(0, 2, 3, 1).contiguous()

x = y + inputs[3 - inx].permute(0, 2, 3, 1).contiguous()

y = layer_up(x)

x = self.norm_up(y)
Expand Down

0 comments on commit ea7c118

Please sign in to comment.