|
|
|
@ -165,11 +165,7 @@ class PatchEmbed(nn.Module):
|
|
|
|
|
if self.norm.normalized_shape[0] == self.in_chans:
|
|
|
|
|
x = self.norm(x.permute(0, 2, 3, 1)).permute(0, 3, 1, 2)
|
|
|
|
|
|
|
|
|
|
print(self.patch_size[1] - W % self.patch_size[1])
|
|
|
|
|
print(self.patch_size[0] - H % self.patch_size[0])
|
|
|
|
|
|
|
|
|
|
x = F.pad(x, (0, (self.patch_size[1] - W % self.patch_size[1]) % self.patch_size[1]))
|
|
|
|
|
|
|
|
|
|
x = F.pad(x, (0, 0, 0, (self.patch_size[0] - H % self.patch_size[0]) % self.patch_size[0]))
|
|
|
|
|
|
|
|
|
|
x = self.proj(x)
|
|
|
|
|