turkic-ocr-code / scripts /r5_ref /ref_step_smoke_empty.sh
treoa's picture
Release 1
24aaa76
Raw History Blame Contribute Delete
702 Bytes
#!/bin/bash
# R5 REF smoke: R1(iii) with empty targets (clutter rows) for 8 batches on the CPU: the CTC loss must stay finite.
set -eu
unset HF_TOKEN HUGGING_FACE_HUB_TOKEN
C=/path/to/TURKIC_OCR_CODE
D=/path/to/TURKIC_OCR_DATA
S=$C/scripts/r5_ref
T=$D/tmp/ref_smoke
rm -rf $T/R1_iii_empty
$C/.venv_kraken/bin/python -I $S/ref_smoke_blank_labels.py $T/iii/mix_iii_R1.tsv $T/iii/mix_iii_R1_blank.tsv
export TF_CPP_MIN_LOG_LEVEL=2 OMP_NUM_THREADS=4
$C/.venv_ref_tf/bin/python -I $S/ref_flor_train.py --run iii --mix_list $T/iii/mix_iii_R1_blank.tsv --refdata $T/iii --out $T/R1_iii_empty --cpu --smoke_pool 64 --batch 4 --steps_per_epoch 4 --epochs 2 --workers 2
grep -n "loss" $T/R1_iii_empty/epochs.log