Download scripts/train_elia_refcoco.py from yxchng/elia: direct link, hf CLI and curl.
- Browser
- Download file 707 Bytes
-
https://huggingface.co/spaces/yxchng/elia/resolve/main/scripts/train_elia_refcoco.py
- Command line
-
hf download hf://spaces/yxchng/elia/scripts/train_elia_refcoco.py
-
curl -L -o train_elia_refcoco.py https://huggingface.co/spaces/yxchng/elia/resolve/main/scripts/train_elia_refcoco.py
707 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="8" --master_port="{:d}" train_elia.py --model="lavt" --dataset="refcoco" --model_id="refcoco" --batch-size="4" --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="480" --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"'.format(port) | |
| print(cmd, flush=True) | |
| os.system(cmd) | |