chinhsuanwu / mobilevit-pytorch

A PyTorch implementation of "MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer"
https://arxiv.org/abs/2110.02178
MIT License
504 stars 70 forks source link

einops.EinopsError: Error while processing rearrange-reduction pattern "b d (h ph) (w pw) -> b (ph pw) (h w) d". #8

Open JiangMei0201 opened 2 years ago

wilbur-caper commented 2 years ago

hi, I face the same error, have you any solution to deal with it?

kennethzhao24 commented 2 years ago

Are you getting the error when you tried to use input size of 224?

When using size of 224, the height and width of the feature is 7 by 7. Since the patch size is 2 by 2, you need to pad or interpolate it to 8 by 8.

Lixuesen-l commented 2 years ago

输入图像的尺寸必须是32的整数倍。patch_size的大小要能被每次下采样后的特征大小整除就可以了

JerryYangxtxy commented 1 month ago

输入图像的尺寸必须是32的整数倍。patch_size的大小要能被每次下采样后的特征大小整除就可以了

我喜欢看中文