xinghaochen / SLAB

[ICML 2024] Official PyTorch implementation of "SLAB: Efficient Transformers with Simplified Linear Attention and Progressive Re-parameterized Batch Normalization"
66 stars 4 forks source link

Question about dataset #4

Open Xiaozeeze opened 2 months ago

Xiaozeeze commented 2 months ago

Could you please give me the link of the data set and the processing method of the data, and tell me which directory the data set should be placed in ?

xinghaochen commented 2 months ago

Could you please give me the link of the data set and the processing method of the data, and tell me which directory the data set should be placed in ?

Which dataset do you mean?

Xiaozeeze commented 2 months ago

the dataset of Image Classification, ImageNet1k?

xinghaochen commented 2 months ago

You can download the ImageNet dataset via the official website and simply pass the path of your dataset using --data-path <imagenet-path> to start training.

python -m torch.distributed.launch --nproc_per_node=8 main.py --cfg <config-path> --data-path <imagenet-path> --output <output-path>
Xiaozeeze commented 2 months ago

Thank you very much, now I meet a new problem.

Traceback (most recent call last): File "eval.py", line 260, in main() File "eval.py", line 136, in main module.merge_bn() File "/public/home/user/.conda/envs/SLAB/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1177, in getattr raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'PatchEmbed' object has no attribute 'merge_bn'

Do you know what happened? Do I need to add merge_bn to PatchEmbed?

guojialong1 commented 2 months ago

Can you provide more detailed information to reproduce this error? Currently, we only support BN fusion for Swin Transformer. This error occurs if used for other models.