Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch Embedding Design Choice? #310

Open
tonyyunyang opened this issue May 12, 2024 · 0 comments
Open

Patch Embedding Design Choice? #310

tonyyunyang opened this issue May 12, 2024 · 0 comments

Comments

@tonyyunyang
Copy link

Hi,
I am very curious about why you chose to design the patch embedding function as below:

self.to_patch_embedding = nn.Sequential(
    Rearrange('b c (f pf) (h p1) (w p2) -> b f (h w) (p1 p2 pf c)', p1 = patch_height, p2 = patch_width, pf = frame_patch_size),
    nn.LayerNorm(patch_dim),
    nn.Linear(patch_dim, dim),
    nn.LayerNorm(dim)
)

I have seen people using other methods, like 2DConv, 3DConv, etc.
I am very curious how you came up with this, because it works extremely well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant