Closed tankpig closed 3 years ago
https://github.com/ofsoundof/LocalViT/blob/0c39edf439aa6a07f852c7d92cff3fbe6d1ade69/models/localvit.py#L200
I think the following line cls_token, x = torch.split(x, [1, embed_dim - 1], dim=1) should be cls_token, x = torch.split(x, [1, num_token - 1], dim=1)
Thanks for pointing out this bug.
https://github.com/ofsoundof/LocalViT/blob/0c39edf439aa6a07f852c7d92cff3fbe6d1ade69/models/localvit.py#L200
I think the following line cls_token, x = torch.split(x, [1, embed_dim - 1], dim=1) should be cls_token, x = torch.split(x, [1, num_token - 1], dim=1)