Add example python script with initialize_globals_from_args()
This commit is contained in:
parent
ae9280ef1a
commit
ec37b3324a
27
bin/run-ldc93s1.py
Executable file
27
bin/run-ldc93s1.py
Executable file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env python
|
||||
import os
|
||||
from import_ldc93s1 import _download_and_preprocess_data as download_ldc
|
||||
from coqui_stt_training.util.config import Config, initialize_globals_from_args
|
||||
from coqui_stt_training.train import train, test, early_training_checks
|
||||
from coqui_stt_ctcdecoder import Alphabet
|
||||
import tensorflow.compat.v1 as tfv1
|
||||
|
||||
# only one GPU for only one training sample
|
||||
os.environ['CUDA_VISIBLE_DEVICES']='0'
|
||||
|
||||
download_ldc("data/ldc93s1")
|
||||
|
||||
initialize_globals_from_args(
|
||||
alphabet_config_path="data/alphabet.txt",
|
||||
train_files=["data/ldc93s1/ldc93s1.csv"],
|
||||
dev_files=["data/ldc93s1/ldc93s1.csv"],
|
||||
test_files=["data/ldc93s1/ldc93s1.csv"],
|
||||
n_hidden=100,
|
||||
epochs=200
|
||||
)
|
||||
|
||||
early_training_checks()
|
||||
|
||||
train()
|
||||
tfv1.reset_default_graph()
|
||||
test()
|
Loading…
Reference in New Issue
Block a user