33 lines
575 B
Bash
Executable File
33 lines
575 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
function populate_env() {
|
|
if [[ -z "$MODEL_PATH" && ! -z "$1" ]]; then
|
|
export MODEL_PATH="$1"
|
|
fi
|
|
|
|
if [[ -z "$DATA_FOLDER" && ! -z "$2" ]]; then
|
|
export DATA_FOLDER="$2"
|
|
fi
|
|
}
|
|
|
|
populate_env
|
|
|
|
case "$1" in
|
|
train)
|
|
precise-lite-train $TRAIN_ARGS "$MODEL_PATH" "$DATA_FOLDER"
|
|
;;
|
|
"train-incremental")
|
|
precise-lite-train-incremental $TRAIN_ARGS "$MODEL_PATH" "$DATA_FOLDER"
|
|
;;
|
|
test)
|
|
precise-lite-test "$MODEL_PATH" "$DATA_FOLDER"
|
|
;;
|
|
convert)
|
|
precise-lite-convert "$MODEL_PATH"
|
|
;;
|
|
*)
|
|
exec $@
|
|
;;
|
|
esac |