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 Shuffle Operation #66

Open
XiongZhongxia opened this issue Nov 16, 2022 · 1 comment
Open

Patch Shuffle Operation #66

XiongZhongxia opened this issue Nov 16, 2022 · 1 comment

Comments

@XiongZhongxia
Copy link

    try:
        x = x.view(batchsize, group, -1, dim)
    except:
        x = torch.cat([x, x[:, -2:-1, :]], dim=1)
        x = x.view(batchsize, group, -1, dim)

Could you please help me understand how this part carry out shuffle operation? I thought there's just a concat...

@heshuting555
Copy link
Collaborator

This operation is just a 'group' operation. Shuffle operation is composed of 'group' and the subsequent 'transpose' operation.

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

2 participants