Skip to content

Commit 2e69586

Browse files
committed
updated checkpoint import process
1 parent 2e89e4b commit 2e69586

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

STT/train.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ pushd $STT_DIR
1313
# only package
1414
if [ -f "/transfer-checkpoint/checkpoint" -a ! -f "/mnt/models/output_graph.tflite" ]; then
1515
echo "Using checkpoint from ${TRANSFER_CHECKPOINT}"
16-
cp -a /transfer-checkpoint/* /mnt/checkpoints/
16+
# we can now use --load_checkpoint_dir instead
17+
#cp -a /transfer-checkpoint/* /mnt/checkpoints/
18+
LOAD_CHECKPOINT_FROM="--load_checkpoint_dir /transfer-checkpoint --save_checkpoint_dir /mnt/checkpoints"
19+
else;
20+
LOAD_CHECKPOINT_FROM="--checkpoint_dir /mnt/checkpoints/"
1721
fi;
1822

1923
EARLY_STOP_FLAG="--early_stop true"
@@ -64,7 +68,7 @@ pushd $STT_DIR
6468
--lm_alpha ${LM_ALPHA} \
6569
--lm_beta ${LM_BETA} \
6670
${EARLY_STOP_FLAG} \
67-
--checkpoint_dir /mnt/checkpoints/
71+
${LOAD_CHECKPOINT_FROM}
6872
fi;
6973

7074
if [ ! -f "/mnt/models/test_output.json" ]; then

0 commit comments

Comments
 (0)