rayleizhu / BiFormer

[CVPR 2023] Official code release of our paper "BiFormer: Vision Transformer with Bi-Level Routing Attention"
https://arxiv.org/abs/2303.08810
MIT License
485 stars 39 forks source link

I want to train on the local computer, how should I change the code, author please can you publish a local computer training code? #16

Closed xuguangyi1999 closed 1 year ago

rayleizhu commented 1 year ago

You may compare the two launch commands below to figure out what to do.

image

hydra_main.py is just a wrapper of main.py to support hydra configuration system and slurm environments. You may read the code of hydra_main.py to figure out how it works if you want.

Maybe I will update the script later to make it have a consistent launch command for both local environment and slurm environment.

xuguangyi1999 commented 1 year ago

This allows training on your local computer:

python -m torch.distributed.launch --nproc_per_node=8 --use_env main.py \ --data-path ./data/in1k \ --output_dir ./run \ --input-size 224 --batch-size 32 --dist-eval \ --model biformer_small \