[Fix] fix sam bug (#1633)

pull/1634/head^2
zzc98 2023-06-15 10:10:51 +08:00 committed by GitHub
parent 3eaf719a64
commit 53648baca5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -593,11 +593,11 @@ class ViTSAM(BaseBackbone):
if i in self.out_indices:
# (B, H, W, C) -> (B, C, H, W)
x = x.permute(0, 3, 1, 2)
x_reshape = x.permute(0, 3, 1, 2)
if self.out_channels > 0:
x = self.channel_reduction(x)
outs.append(self._format_output(x))
x_reshape = self.channel_reduction(x_reshape)
outs.append(self._format_output(x_reshape))
return tuple(outs)