Skip to content

Commit 65acbf7

Browse files
committed
update examples and model summary print
1 parent d49dee3 commit 65acbf7

File tree

16 files changed

+63
-63
lines changed

16 files changed

+63
-63
lines changed

examples/conformer/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ Go to [config.yml](./config.yml)
1010

1111
## Usage
1212

13-
Training, see `python examples/conformer/train_*.py --help`
13+
Training, see `python examples/conformer/train.py --help`
1414

15-
Testing, see `python examples/conformer/test_*.py --help`
15+
Testing, see `python examples/conformer/test.py --help`
1616

17-
TFLite Conversion, see `python examples/conformer/tflite_*.py --help`
17+
TFLite Conversion, see `python examples/conformer/inference/gen_tflite_model.py --help`
1818

1919
## Conformer Subwords - Results on LibriSpeech
2020

examples/conformer/config.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ decoder_config:
3131
beam_width: 0
3232
norm_score: True
3333
corpus_files:
34-
- /h/MLDL/Datasets/ASR/Raw/LibriSpeech/train-clean-100/transcripts.tsv
34+
- H:/MLDL/Datasets/ASR/Raw/LibriSpeech/train-clean-100/transcripts.tsv
3535

3636
model_config:
3737
name: conformer
@@ -75,7 +75,7 @@ learning_config:
7575
num_masks: 1
7676
mask_factor: 27
7777
data_paths:
78-
- /h/MLDL/Datasets/ASR/Raw/LibriSpeech/train-clean-100/transcripts.tsv
78+
- H:/MLDL/Datasets/ASR/Raw/LibriSpeech/train-clean-100/transcripts.tsv
7979
tfrecords_dir: null
8080
shuffle: True
8181
cache: True
@@ -85,7 +85,8 @@ learning_config:
8585

8686
eval_dataset_config:
8787
use_tf: True
88-
data_paths: null
88+
data_paths:
89+
- H:/MLDL/Datasets/ASR/Raw/LibriSpeech/dev-clean/transcripts.tsv
8990
tfrecords_dir: null
9091
shuffle: False
9192
cache: True
@@ -95,7 +96,8 @@ learning_config:
9596

9697
test_dataset_config:
9798
use_tf: True
98-
data_paths: null
99+
data_paths:
100+
- H:/MLDL/Datasets/ASR/Raw/LibriSpeech/test-clean/transcripts.tsv
99101
tfrecords_dir: null
100102
shuffle: False
101103
cache: True
@@ -113,13 +115,13 @@ learning_config:
113115
batch_size: 2
114116
num_epochs: 50
115117
checkpoint:
116-
filepath: /d/Models/local/conformer/checkpoints/{epoch:02d}.h5
118+
filepath: D:/Models/local/conformer/checkpoints/{epoch:02d}.h5
117119
save_best_only: False
118120
save_weights_only: True
119121
save_freq: epoch
120-
states_dir: /d/Models/local/conformer/states
122+
states_dir: D:/Models/local/conformer/states
121123
tensorboard:
122-
log_dir: /d/Models/local/conformer/tensorboard
124+
log_dir: D:/Models/local/conformer/tensorboard
123125
histogram_freq: 1
124126
write_graph: True
125127
write_images: True

examples/conformer/train.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ def main(
7575
)
7676

7777
with strategy.scope():
78-
# build model
7978
conformer = Conformer(**config.model_config, vocabulary_size=text_featurizer.num_classes)
8079
conformer.make(speech_featurizer.shape, prediction_shape=text_featurizer.prepand_shape, batch_size=global_batch_size)
8180
if pretrained:

examples/contextnet/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ Go to [config.yml](./config.yml)
1212

1313
## Usage
1414

15-
Training, see `python examples/contextnet/train_*.py --help`
15+
Training, see `python examples/contextnet/train.py --help`
1616

17-
Testing, see `python examples/contextnet/test_*.py --help`
17+
Testing, see `python examples/contextnet/test.py --help`
1818

19-
TFLite Conversion, see `python examples/contextnet/tflite_*.py --help`
19+
TFLite Conversion, see `python examples/contextnet/inference/gen_tflite_model.py --help`
2020

2121
## RNN Transducer Subwords - Results on LibriSpeech
2222

examples/contextnet/config.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ speech_config:
2424
normalize_per_frame: False
2525

2626
decoder_config:
27-
vocabulary: null
27+
vocabulary: ./vocabularies/librispeech/librispeech_train_4_1030.subwords
2828
target_vocab_size: 1024
2929
max_subword_length: 4
3030
blank_at_zero: True
@@ -207,7 +207,7 @@ learning_config:
207207
num_masks: 1
208208
mask_factor: 27
209209
data_paths:
210-
- /mnt/h/ML/Datasets/ASR/Raw/LibriSpeech/train-clean-100/transcripts.tsv
210+
- H:/MLDL/Datasets/ASR/Raw/LibriSpeech/train-clean-100/transcripts.tsv
211211
tfrecords_dir: null
212212
shuffle: True
213213
cache: True
@@ -217,7 +217,8 @@ learning_config:
217217

218218
eval_dataset_config:
219219
use_tf: True
220-
data_paths: null
220+
data_paths:
221+
- H:/MLDL/Datasets/ASR/Raw/LibriSpeech/dev-clean/transcripts.tsv
221222
tfrecords_dir: null
222223
shuffle: False
223224
cache: True
@@ -228,7 +229,7 @@ learning_config:
228229
test_dataset_config:
229230
use_tf: True
230231
data_paths:
231-
- /mnt/h/ML/Datasets/ASR/Raw/LibriSpeech/test-clean/transcripts.tsv
232+
- H:/MLDL/Datasets/ASR/Raw/LibriSpeech/test-clean/transcripts.tsv
232233
tfrecords_dir: null
233234
shuffle: False
234235
cache: True
@@ -246,13 +247,13 @@ learning_config:
246247
batch_size: 2
247248
num_epochs: 20
248249
checkpoint:
249-
filepath: /mnt/e/Models/local/contextnet/checkpoints/{epoch:02d}.h5
250+
filepath: D:/Models/local/contextnet/checkpoints/{epoch:02d}.h5
250251
save_best_only: False
251252
save_weights_only: True
252253
save_freq: epoch
253-
states_dir: /mnt/e/Models/local/contextnet/states
254+
states_dir: D:/Models/local/contextnet/states
254255
tensorboard:
255-
log_dir: /mnt/e/Models/local/contextnet/tensorboard
256+
log_dir: D:/Models/local/contextnet/tensorboard
256257
histogram_freq: 1
257258
write_graph: True
258259
write_images: True

examples/contextnet/train.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ def main(
7575
)
7676

7777
with strategy.scope():
78-
# build model
7978
contextnet = ContextNet(**config.model_config, vocabulary_size=text_featurizer.num_classes)
8079
contextnet.make(speech_featurizer.shape, prediction_shape=text_featurizer.prepand_shape, batch_size=global_batch_size)
8180
if pretrained:

examples/deepspeech2/config.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ learning_config:
5252
train_dataset_config:
5353
use_tf: True
5454
data_paths:
55-
- /mnt/h/ML/Datasets/ASR/Raw/LibriSpeech/train-clean-100/transcripts.tsv
55+
- H:/MLDL/Datasets/ASR/Raw/LibriSpeech/train-clean-100/transcripts.tsv
5656
tfrecords_dir: null
5757
shuffle: True
5858
cache: True
@@ -62,7 +62,8 @@ learning_config:
6262

6363
eval_dataset_config:
6464
use_tf: True
65-
data_paths: null
65+
data_paths:
66+
- H:/MLDL/Datasets/ASR/Raw/LibriSpeech/dev-clean/transcripts.tsv
6667
tfrecords_dir: null
6768
shuffle: False
6869
cache: True
@@ -73,7 +74,7 @@ learning_config:
7374
test_dataset_config:
7475
use_tf: True
7576
data_paths:
76-
- /mnt/h/ML/Datasets/ASR/Raw/LibriSpeech/test-clean/transcripts.tsv
77+
- H:/MLDL/Datasets/ASR/Raw/LibriSpeech/test-clean/transcripts.tsv
7778
tfrecords_dir: null
7879
shuffle: False
7980
cache: True
@@ -90,13 +91,13 @@ learning_config:
9091
batch_size: 4
9192
num_epochs: 20
9293
checkpoint:
93-
filepath: /mnt/e/Models/local/deepspeech2/checkpoints/{epoch:02d}.h5
94+
filepath: D:/Models/local/deepspeech2/checkpoints/{epoch:02d}.h5
9495
save_best_only: False
9596
save_weights_only: True
9697
save_freq: epoch
97-
states_dir: /mnt/e/Models/local/deepspeech2/states
98+
states_dir: D:/Models/local/deepspeech2/states
9899
tensorboard:
99-
log_dir: /mnt/e/Models/local/deepspeech2/tensorboard
100+
log_dir: D:/Models/local/deepspeech2/tensorboard
100101
histogram_freq: 1
101102
write_graph: True
102103
write_images: True

examples/deepspeech2/train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def main(
3131
config: str = DEFAULT_YAML,
3232
tfrecords: bool = False,
3333
sentence_piece: bool = False,
34-
subwords: bool = True,
34+
subwords: bool = False,
3535
bs: int = None,
3636
spx: int = 1,
3737
metadata: str = None,

examples/jasper/config.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ learning_config:
5959
train_dataset_config:
6060
use_tf: True
6161
data_paths:
62-
- /mnt/h/ML/Datasets/ASR/Raw/LibriSpeech/train-clean-100/transcripts.tsv
62+
- H:/MLDL/Datasets/ASR/Raw/LibriSpeech/train-clean-100/transcripts.tsv
6363
tfrecords_dir: null
6464
shuffle: True
6565
cache: True
@@ -69,7 +69,8 @@ learning_config:
6969

7070
eval_dataset_config:
7171
use_tf: True
72-
data_paths: null
72+
data_paths:
73+
- H:/MLDL/Datasets/ASR/Raw/LibriSpeech/dev-clean/transcripts.tsv
7374
tfrecords_dir: null
7475
shuffle: False
7576
cache: True
@@ -80,7 +81,7 @@ learning_config:
8081
test_dataset_config:
8182
use_tf: True
8283
data_paths:
83-
- /mnt/h/ML/Datasets/ASR/Raw/LibriSpeech/test-clean/transcripts.tsv
84+
- H:/MLDL/Datasets/ASR/Raw/LibriSpeech/test-clean/transcripts.tsv
8485
tfrecords_dir: null
8586
shuffle: False
8687
cache: True
@@ -97,13 +98,13 @@ learning_config:
9798
batch_size: 4
9899
num_epochs: 20
99100
checkpoint:
100-
filepath: /mnt/e/Models/local/jasper/checkpoints/{epoch:02d}.h5
101+
filepath: D:/Models/local/jasper/checkpoints/{epoch:02d}.h5
101102
save_best_only: False
102103
save_weights_only: True
103104
save_freq: epoch
104-
states_dir: /mnt/e/Models/local/jasper/states
105+
states_dir: D:/Models/local/jasper/states
105106
tensorboard:
106-
log_dir: /mnt/e/Models/local/jasper/tensorboard
107+
log_dir: D:/Models/local/jasper/tensorboard
107108
histogram_freq: 1
108109
write_graph: True
109110
write_images: True

examples/jasper/train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def main(
3030
config: str = DEFAULT_YAML,
3131
tfrecords: bool = False,
3232
sentence_piece: bool = False,
33-
subwords: bool = True,
33+
subwords: bool = False,
3434
bs: int = None,
3535
spx: int = 1,
3636
metadata: str = None,

0 commit comments

Comments
 (0)