123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- source /home/korsch/.anaconda3/etc/profile.d/conda.sh
- conda activate chainer4
- if [[ $GDB == "1" ]]; then
- PYTHON="gdb -ex run --args python"
- elif [[ $MPI == "1" ]]; then
- N_MPI=${N_MPI:-2}
- HOSTFILE=${HOSTFILE:-hosts.conf}
- PYTHON="mpirun -n $N_MPI --hostfile ${HOSTFILE} -x PATH -x CUDA_PATH python"
- OPTS="${OPTS} --mpi"
- elif [[ $PROFILE == "1" ]]; then
- PYTHON="python -m cProfile -o profile"
- else
- PYTHON="python"
- fi
- RUN_SCRIPT="../main.py"
- ###### Dataset config ######
- BASE_DIR=/home/korsch/Data
- OPTIMIZER=${OPTIMIZER:-adam}
- MODEL_TYPE=${MODEL_TYPE:-resnet}
- PREPARE_TYPE=${PREPARE_TYPE:-model}
- MODEL_DIR=${BASE_DIR}/MODELS/${MODEL_TYPE}
- OUTPUT_DIR=${OUTPUT_DIR:-../.results/ft_${DATASET}/${OPTIMIZER}${OUTPUT_SUFFIX}}
- ###### Training config ######
- BATCH_SIZE=${BATCH_SIZE:-24}
- GPU=${GPU:-"0"}
- EPOCHS=${EPOCHS:-100}
- DECAY=${DECAY:-5e-4}
- LR=${LR:-"-lr 1e-3 -lrd 1e-1 -lrt 1e-8 -lrs 20"}
- FINAL_POOLING=${FINAL_POOLING:-g_avg}
- N_JOBS=${N_JOBS:-1}
- if [[ $N_JOBS != "0" ]]; then
- export OMP_NUM_THREADS=2
- fi
- ###### OPTIONS ######
- OPTS="${OPTS} --epochs ${EPOCHS}"
- OPTS="${OPTS} --gpu ${GPU}"
- OPTS="${OPTS} --batch_size ${BATCH_SIZE}"
- # if [[ -f sacred/creds.sh ]]; then
- # source sacred/creds.sh
- # else
- # echo "No sacred credentials found! Disabling sacred."
- # OPTS="${OPTS} --no_sacred"
- # fi
- OPTS="${OPTS} --augment"
- OPTS="${OPTS} --model_type ${MODEL_TYPE}"
- OPTS="${OPTS} --prepare_type ${PREPARE_TYPE}"
- OPTS="${OPTS} --n_jobs ${N_JOBS}"
- OPTS="${OPTS} --optimizer ${OPTIMIZER}"
- OPTS="${OPTS} --output ${OUTPUT_DIR}"
- OPTS="${OPTS} --pooling ${FINAL_POOLING}"
- OPTS="${OPTS} --decay ${DECAY}"
- OPTS="${OPTS} ${LR}"
|