Skip to content

Commit a3df590

Browse files
committed
update htr-train-pipeline.sh to include replace_final_layer
1 parent 66472af commit a3df590

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/htr-train-pipeline.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ epochs=1
3434
height=$HTRLOGHIMODELHEIGHT
3535
multiply=1
3636

37+
replacefinallayer=""
38+
# to replace final layer during basemodel finetuning uncomment next line
39+
#replacefinallayer=" --replace_final_layer "
40+
3741
# Best not to go lower than 2 with batchsize
3842
batch_size=40
3943
model_name=myfirstmodel
@@ -69,6 +73,7 @@ if [[ $GPU -gt -1 ]]; then
6973
echo "Using GPU ${GPU}"
7074
fi
7175

76+
7277
# Starting the training
7378
echo "Starting Loghi HTR training with model $MODEL"
7479
docker run $DOCKERGPUPARAMS --rm -u $(id -u ${USER}):$(id -g ${USER}) -m 32000m --shm-size 10240m -ti \
@@ -93,7 +98,7 @@ docker run $DOCKERGPUPARAMS --rm -u $(id -u ${USER}):$(id -g ${USER}) -m 32000m
9398
--model $MODEL \
9499
--aug_multiply $multiply \
95100
--model_name $model_name \
96-
--output $tmpdir/output
101+
--output $tmpdir/output $replacefinallayer
97102

98103
echo "Results can be found at:"
99104
echo $tmpdir

0 commit comments

Comments
 (0)