AILab-CVC/UniRepLKNet

Layer Decay impl only supports convnext_small/base/large/xlarge

ZackSong0319 opened this issue · 1 comments

When I execute the command

python -m torch.distributed.launch --nproc_per_node=2 main.py
--model unireplknet_xl --drop_path 0.3 --input_size 384
--batch_size 32 --lr 5e-5 --update_freq 2
--model_ema true --model_ema_eval true
--warmup_epochs 0 --epochs 20 --weight_decay 1e-8 --smoothing 0.3
--layer_decay 0.8 --head_init_scale 0.001 --cutmix 0 --mixup 0
--finetune unireplknet_xl_in22k_to_in1k_384_acc87.96.pth
--data_path UniRepLKNet/dataset
--output_dir UniRepLKNet/dataset/results

this code:
if args.layer_decay < 1.0 or args.layer_decay > 1.0:
num_layers = 12 # convnext layers divided into 12 parts, each with a different decayed lr value.
assert args.model in ['convnext_small', 'convnext_base', 'convnext_large', 'convnext_xlarge'],
"Layer Decay impl only supports convnext_small/base/large/xlarge"
assigner = LayerDecayValueAssigner(list(args.layer_decay ** (num_layers + 1 - i) for i in range(num_layers + 2)))
else:
assigner = None
run wrong!!!
Do you think it's a typo in the name that caused this?How can I resolve it? Thank you.

Yes, this can be easily replaced with "unireplknet_s", "unireplknet_l", etc.