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

Questions about the inter Attention #1

Open
ZiyuFanCSU opened this issue Mar 13, 2024 · 0 comments
Open

Questions about the inter Attention #1

ZiyuFanCSU opened this issue Mar 13, 2024 · 0 comments

Comments

@ZiyuFanCSU
Copy link

ZiyuFanCSU commented Mar 13, 2024

Dear author, I have some doubts about the code here:

        ####inter Attention######
        x = x.unfold(dimension=1, size=self.patch_size, step=self.stride)  # [b x patch_num x nvar x dim x patch_len]
        x = x.permute(0, 2, 1, 3, 4)  # [b x nvar x patch_num x dim x patch_len ]
        b, nvar, patch_num, dim, patch_len = x.shape

        x = torch.reshape(x, (
        x.shape[0] * x.shape[1], x.shape[2], x.shape[3] * x.shape[-1]))  # [b*nvar, patch_num, dim*patch_len]

Could you please explain what nvar means, and why can you use (b x nvar)? Does (b x nvar) represent a new batch?

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