Download scripts/train_elia_refcoco_debug.py from yxchng/elia: direct link, hf CLI and curl.
- Browser
- Download file 713 Bytes
-
https://huggingface.co/spaces/yxchng/elia/resolve/main/scripts/train_elia_refcoco_debug.py
- Command line
-
hf download hf://spaces/yxchng/elia/scripts/train_elia_refcoco_debug.py
-
curl -L -o train_elia_refcoco_debug.py https://huggingface.co/spaces/yxchng/elia/resolve/main/scripts/train_elia_refcoco_debug.py
713 Bytes
| import os | |
| import random | |
| port = random.randrange(2, 65534) | |
| cmd='NCCL_IB_DISABLE=1 NCCL_DEBUG=VERSION NCCL_P2P_DISABLE=1 python -m torch.distributed.launch --nproc_per_node="2" --master_port="{:d}" train_elia.py --model="lavt" --dataset="refcoco" --model_id="refcoco" --batch-size="2" --lr="0.00005" --wd="1e-2" --swin_type="base" --pretrained_swin_weights="./pretrained_weights/swin_base_patch4_window12_384_22k.pth" --epochs="40" --img_size="224" --plic_pos_temp="0.1" --plic_neg_temp="0.1" --plic_lang_temp="0.3" --plic_pos_weight="0.5" --plic_neg_weight="0.5" --plic_lang_weight="0.5" --smlm_weight="0.1" --output-dir="./checkpoints/elia_refcoco_debug"'.format(port) | |
| print(cmd, flush=True) | |
| os.system(cmd) | |