Skip to content

Instantly share code, notes, and snippets.

@matthewchung74
Created February 5, 2021 23:46
Show Gist options
  • Save matthewchung74/95412dd16bcdab3e59ab9c363d0c7974 to your computer and use it in GitHub Desktop.
Save matthewchung74/95412dd16bcdab3e59ab9c363d0c7974 to your computer and use it in GitHub Desktop.
x = self.patch_embed(x)
cls_tokens = self.cls_token.expand(B, -1, -1)
x = torch.cat((cls_tokens, x), dim=1)
x = x + self.pos_embed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment