ofsoundof / LocalViT

MIT License
113 stars 14 forks source link

localvit.py#L200 error #1

Closed tankpig closed 3 years ago

tankpig commented 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)

ofsoundof commented 3 years ago

Thanks for pointing out this bug.