yitu-opensource / T2T-ViT

ICCV2021, Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem about visualization_vit.ipynb

koala719 opened this issue · comments

When I ran visualization_vit.ipynb, the following error appeared:

Traceback (most recent call last):
File "visualization_vit.py", line 52, in
results = [all_block0]
File "/home/drl/anaconda3/envs/torch1.8/lib/python3.6/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(input, **kwargs)
File "/home/drl/anaconda3/envs/torch1.8/lib/python3.6/site-packages/timm/models/vision_transformer.py", line 164, in forward
f"Input image size ({H}
{W}) doesn't match model ({self.img_size[0]}{self.img_size[1]})."
AssertionError: Input image size (512
512) doesn't match model (384*384).

If I change the size of the picture to 384, the visualization results are inconsistent with the paper. Can you provide some suggestions?The following is the visualization result when the size is 384.

image