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

RuntimeError: The size of tensor a (4) must match the size of tensor b (16) at non-singleton dimension 1 #71

Open
FenggSuu opened this issue Jul 8, 2024 · 1 comment

Comments

@FenggSuu
Copy link

FenggSuu commented Jul 8, 2024

ERROR when run run_videomamba_pretraining.py.
File ".../VideoMamba/videomamba/video_sm/models/videomamba_pretrain.py", line 433, in forward
x_clip_vis = self.forward_features(x, mask)
File ".../VideoMamba/videomamba/video_sm/models/videomamba_pretrain.py", line 383, in forward_features
x = x + self.temporal_pos_embedding
RuntimeError: The size of tensor a (4) must match the size of tensor b (16) at non-singleton dimension 1

I printed the dimension of x and before the line of x = x + self.temporal_pos_embedding.
print(x.size())
torch.Size([3136, 4, 576])
print(self.temporal_pos_embedding.size())
torch.Size([1, 16, 576])

@Andy1621
Copy link
Collaborator

Andy1621 commented Jul 8, 2024

For different input frames, please interpolate the temporal_pos_embedding.

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