-
Notifications
You must be signed in to change notification settings - Fork 66
/
train.sh
executable file
·31 lines (29 loc) · 947 Bytes
/
train.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
export CUDA_VISIBLE_DEVICES=0,1,2,3
export LD_PRELOAD="/usr/lib/libtcmalloc.so"
train_dir="./resnet_baseline"
train_dataset="scripts/train_shuffle.txt"
train_image_root="/data1/common_datasets/imagenet_resized/"
val_dataset="scripts/val.txt"
val_image_root="/data1/common_datasets/imagenet_resized/ILSVRC2012_val/"
python train.py --train_dir $train_dir \
--train_dataset $train_dataset \
--train_image_root $train_image_root \
--val_dataset $val_dataset \
--val_image_root $val_image_root \
--batch_size 64 \
--num_gpus 4 \
--val_interval 1000 \
--val_iter 100 \
--l2_weight 0.0001 \
--initial_lr 0.01 \
--lr_step_epoch 10.0 \
--lr_decay 0.1 \
--max_steps 100000 \
--checkpoint_interval 5000 \
--gpu_fraction 0.96 \
--display 100 \
--basemodel "./init/model.ckpt" \
#--finetune True \
# ResNet-18 baseline loaded from torch resnet-18.t7
# Finetune for 10 epochs