Shunted-Transformer icon indicating copy to clipboard operation
Shunted-Transformer copied to clipboard

你好 OverlapPatchEmbed 类中的问题?

Open AustinYuAo opened this issue 1 year ago • 0 comments

class OverlapPatchEmbed(nn.Module): """ Image to Patch Embedding """

def __init__(self, img_size=224, patch_size=7, stride=4, in_chans=3, embed_dim=768):
    super().__init__()
    img_size = to_2tuple(img_size)
    patch_size = to_2tuple(patch_size)

    self.img_size = img_size
    self.patch_size = patch_size
    self.H, self.W = img_size[0] // patch_size[0], img_size[1] // patch_size[1]
    self.num_patches = self.H * self.W

你好 OverlapPatchEmbed 类中的这里进行的计算后续也没有用到啊? 有什么特别意义吗?

AustinYuAo avatar Aug 10 '23 09:08 AustinYuAo