OpenGVLab / CaFo

[CVPR 2023] Prompt, Generate, then Cache: Cascade of Foundation Models makes Strong Few-shot Learners
MIT License
348 stars 18 forks source link

RuntimeError: permute(sparse_coo): number of dimensions in the tensor input does not match the length of the desired ordering of dimensions i.e. input.dim() = 4 is not equal to len(dims) = 2 #11

Open zpylyuuuu opened 11 months ago

zpylyuuuu commented 11 months ago

Traceback (most recent call last): File "D:\few-shot-code\2023CaFo-main\CaFo-main\main.py", line 276, in main() File "D:\few-shot-code\2023CaFo-main\CaFo-main\main.py", line 234, in main dino_cache_keys, dino_cache_values = build_dino_cache_model(cfg, dino_model, train_loader_cache) File "D:\few-shot-code\2023CaFo-main\CaFo-main\utils.py", line 96, in build_dino_cache_model cache_keys = cache_keys.permute(1, 0) RuntimeError: permute(sparse_coo): The number of dimensions in the tensor input does not match the length of the desired ordering of dimensions i.e. input.dim() = 4 is not equal to len(dims) = 2 Has the author encountered this problem and how to solve it?

caoziyang1997 commented 2 months ago

Traceback (most recent call last): File "D:\few-shot-code\2023CaFo-main\CaFo-main\main.py", line 276, in main() File "D:\few-shot-code\2023CaFo-main\CaFo-main\main.py", line 234, in main dino_cache_keys, dino_cache_values = build_dino_cache_model(cfg, dino_model, train_loader_cache) File "D:\few-shot-code\2023CaFo-main\CaFo-main\utils.py", line 96, in build_dino_cache_model cache_keys = cache_keys.permute(1, 0) RuntimeError: permute(sparse_coo): The number of dimensions in the tensor input does not match the length of the desired ordering of dimensions i.e. input.dim() = 4 is not equal to len(dims) = 2 Has the author encountered this problem and how to solve it?

请问,imagenet数据集怎么下载啊,我下载之后,运行报错。