summaryrefslogtreecommitdiff
path: root/tasks/train.sh
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-09-30 23:01:43 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-09-30 23:01:43 +0200
commit1d67f132a400a332eff36555cf5ae3529f436352 (patch)
treee596985bed66bccd2427825ac5df13e3fc27157a /tasks/train.sh
parentc7ce2de1fc62429eb75b26d6b138668f287835fd (diff)
Remove tasks
Diffstat (limited to 'tasks/train.sh')
-rwxr-xr-xtasks/train.sh68
1 files changed, 0 insertions, 68 deletions
diff --git a/tasks/train.sh b/tasks/train.sh
deleted file mode 100755
index 60cbd23..0000000
--- a/tasks/train.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/bash
-
-
-# Add checkpoint and resume experiment
-usage() {
- cat << EOF
- usage: ./tasks/train_crnn_line_ctc_model.sh
- -f | --experiment_config Name of the experiment config.
- -c | --checkpoint (Optional) The experiment name to continue from.
- -p | --pretrained_weights (Optional) Path to pretrained weights.
- -n | --notrain (Optional) Evaluates a trained model.
- -t | --test (Optional) If set, evaluates the model on test set.
- -v | --verbose (Optional) Sets the verbosity.
- -h | --help Shows this message.
-EOF
-exit 1
-}
-
-experiment_config=""
-checkpoint=""
-pretrained_weights=""
-notrain=""
-test=""
-verbose=""
-train_command=""
-
-while getopts 'f:c:p:nthv' flag; do
- case "${flag}" in
- f) experiment_config="${OPTARG}" ;;
- c) checkpoint="${OPTARG}" ;;
- p) pretrained_weights="${OPTARG}" ;;
- n) notrain="--notrain" ;;
- t) test="--test" ;;
- v) verbose="${verbose}v" ;;
- h) usage ;;
- *) error "Unexpected option ${flag}" ;;
- esac
-done
-
-
-if [ -z ${experiment_config} ];
-then
- echo "experiment_config not specified!"
- usage
- exit 1
-fi
-
-experiments_filename="training/experiments/${experiment_config}"
-train_command=$(bash tasks/prepare_experiments.sh $experiments_filename)
-
-if [ ${checkpoint} ];
-then
- train_command="${train_command} --checkpoint $checkpoint"
-fi
-
-if [ ${pretrained_weights} ];
-then
- train_command="${train_command} --pretrained_weights $pretrained_weights"
-fi
-
-if [ ${verbose} ];
-then
- train_command="${train_command} -$verbose"
-fi
-
-train_command="${train_command} $test $notrain"
-echo $train_command
-eval $train_command