run.sh 1.1 KB
Newer Older
L
lijianshe02 已提交
1
# examples of running programs:
L
lijianshe02 已提交
2 3
# bash ./run.sh inference EDVR ./configs/edvr_L.yaml
# bash ./run.sh predict EDvR ./cofings/edvr_L.yaml
L
lijianshe02 已提交
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

# configs should be ./configs/xxx.yaml

mode=$1
name=$2
configs=$3

save_inference_dir="./data/inference_model"
use_gpu=True
fix_random_seed=False
log_interval=1
valid_interval=1

weights="./weights/paddle_state_dict_L.npz"


L
LielinJiang 已提交
20 21 22 23
export CUDA_VISIBLE_DEVICES=6   #0,1,5,6 fast,  2,3,4,7 slow
# export FLAGS_fast_eager_deletion_mode=1
# export FLAGS_eager_delete_tensor_gb=0.0
# export FLAGS_fraction_of_gpu_memory_to_use=0.98
L
lijianshe02 已提交
24

L
lijianshe02 已提交
25
if [ "$mode"x == "predict"x ]; then
L
lijianshe02 已提交
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
    echo $mode $name $configs $weights
    if [ "$weights"x != ""x ]; then
        python predict.py --model_name=$name \
                          --config=$configs \
                          --log_interval=$log_interval \
                          --video_path='' \
                          --use_gpu=$use_gpu
    else
        python predict.py --model_name=$name \
                          --config=$configs \
                          --log_interval=$log_interval \
                          --use_gpu=$use_gpu \
                          --video_path=''
    fi
fi