run_predict.sh 541 字节
Newer Older
W
wuzewu 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
cuda_visible_devices=0
module=resnet50
use_gpu=False
checkpoint_dir=paddlehub_finetune_ckpt

while getopts "gm:c:d:" options
do
	case "$options" in
        m)
            module=$OPTARG;;
        c)
            checkpoint_dir=$OPTARG;;
        d)
            cuda_visible_devices=$OPTARG;;
        g)
            use_gpu=True;;
		?)
			echo "unknown options"
            exit 1;;
	esac
done

export CUDA_VISIBLE_DEVICES=${cuda_visible_devices}

25
python -u predict.py --use_gpu ${use_gpu} --checkpoint_dir ${checkpoint_dir} --module ${module}