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

einops.EinopsError #11

Open
Michael-Chao opened this issue Jun 18, 2023 · 0 comments
Open

einops.EinopsError #11

Michael-Chao opened this issue Jun 18, 2023 · 0 comments

Comments

@Michael-Chao
Copy link

import torch
from light_cnns import mobilevit_s
model = mobilevit_s()
model.eval()
print(model)
input = torch.randn(1, 3, 224, 224)
y = model(input)
print(y.size())
这段代码输入报错:einops.EinopsError: Error while processing rearrange-reduction pattern "b d (h ph) (w pw) -> b (ph pw) (h w) d".
Input tensor shape: torch.Size([1, 240, 7, 7]). Additional info: {'ph': 2, 'pw': 2}.
Shape mismatch, can't divide axis of length 7 in chunks of 2

修改为(1, 3, 256, 256)才好

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