Skip to content

Commit

Permalink
finetune/neck experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
Brilliant-B committed Aug 9, 2023
1 parent 8da2d25 commit 705ae1c
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
6 changes: 3 additions & 3 deletions configs/fpn_neck.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
lr_config = dict(
policy='poly',
warmup='linear',
warmup_iters=1500,
warmup_ratio=1e-6,
warmup_iters=80000, # 1500,
warmup_ratio=1e-11, # 1e-6,
power=1.0,
min_lr=0.0,
by_epoch=False,
)

checkpoint_config = dict(interval=2000,)
checkpoint_config = dict(interval=5000,)
evaluation = dict(interval=10000,)
7 changes: 4 additions & 3 deletions configs/linear_neck.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@
lr_config = dict(
policy='poly',
warmup='linear',
warmup_iters=1500,
warmup_ratio=1e-6,
warmup_iters=40000,# 1500,
warmup_ratio=1e-11,# 1e-6,
power=1.0,
min_lr=0.0,
by_epoch=False,
)

checkpoint_config = dict(interval=2000,)
runner = dict(type='IterBasedRunner', max_iters=40000)
checkpoint_config = dict(interval=100,)
evaluation = dict(interval=10000,)
6 changes: 3 additions & 3 deletions configs/sfp_neck.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
lr_config = dict(
policy='poly',
warmup='linear',
warmup_iters=1500,
warmup_ratio=1e-6,
warmup_iters=80000, # 1500,
warmup_ratio=1e-11, # 1e-6,
power=1.0,
min_lr=0.0,
by_epoch=False,
)

checkpoint_config = dict(interval=2000,)
checkpoint_config = dict(interval=5000,)
evaluation = dict(interval=10000,)
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
GPU=0
NAME="eva2_segmenter"
CONFIGS="configs/linear_neck.py"
CKPT="/hy-tmp/workbench/eva2_segmenter/train/neck_linear_finetune_0/iter_22000.pth"
CKPT="/hy-tmp/workbench/eva2_segmenter/train/neck_linear_finetune_0/100.pth"
WORK_DIR="/hy-tmp/workbench/${NAME}/eval/"
SHOW_DIR="/hy-tmp/workbench/${NAME}/eval/inference/"

Expand Down
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def main(args, info, verbose=False):

if __name__ == '__main__':
args = parse_args()
neck_choices = ["fpn", "sfp", "linear"]
neck_choices = ["fpn", "sfp", "linear"][2:]
# finetune_code = {0: no-freeze, 1: freeze EVA}
for n in neck_choices:
hyper_info = {
Expand Down
9 changes: 5 additions & 4 deletions train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ GPU=0
NAME="eva2_segmenter"
WORK_DIR="/hy-tmp/workbench/${NAME}/train/"
RESUME=""
LOAD=""
LOAD="/hy-tmp/workbench/eva2_segmenter/train/neck_linear_finetune_0/100.pth"

python train.py --seed 0 --deterministic --gpu-ids ${GPU} \
--work-dir ${WORK_DIR} \
# --resume-from ${RESUME} \
# --no-validate
# --load-from ${LOAD}
# --resume-from ${RESUME} \
# --load-from ${LOAD}
# --no-validate

0 comments on commit 705ae1c

Please sign in to comment.