Skip to content

Commit 283d1f2

Browse files
committed
✍️ update base runner and dataset for empty eval dataset
1 parent fa85aa1 commit 283d1f2

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

examples/conformer/config.yml

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

2626
decoder_config:
27-
vocabulary: ./vocabularies/librispeech/librispeech_train_4_1030.subwords
27+
vocabulary: null
2828
target_vocab_size: 4096
2929
max_subword_length: 4
3030
blank_at_zero: True
@@ -74,7 +74,7 @@ learning_config:
7474
num_masks: 1
7575
mask_factor: 27
7676
data_paths:
77-
- /media/nlhuy/Data/ML/Datasets/ASR/Raw/LibriSpeech/train-clean-100/transcripts.tsv
77+
- /mnt/Data/ML/Datasets/ASR/Raw/LibriSpeech/train-clean-100/transcripts.tsv
7878
tfrecords_dir: /mnt/Miscellanea/Datasets/Speech/LibriSpeech/tfrecords
7979
shuffle: True
8080
cache: True

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
setuptools.setup(
2424
name="TensorFlowASR",
25-
version="0.8.0",
25+
version="0.8.1",
2626
author="Huy Le Nguyen",
2727
author_email="[email protected]",
2828
description="Almost State-of-the-art Automatic Speech Recognition using Tensorflow 2",

tensorflow_asr/datasets/base_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __init__(self,
3636
use_tf: bool = False,
3737
stage: str = "train",
3838
**kwargs):
39-
self.data_paths = data_paths
39+
self.data_paths = data_paths or []
4040
self.augmentations = augmentations # apply augmentation
4141
self.cache = cache # whether to cache WHOLE transformed dataset to memory
4242
self.shuffle = shuffle # whether to shuffle tf.data.Dataset

tensorflow_asr/runners/base_runners.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ def set_eval_data_loader(self, eval_dataset, eval_bs=None):
136136
return
137137
if not eval_bs: eval_bs = self.config.batch_size
138138
self.eval_data = eval_dataset.create(eval_bs * self.strategy.num_replicas_in_sync)
139-
self.eval_data_loader = self.strategy.experimental_distribute_dataset(self.eval_data)
139+
if self.eval_data is None:
140+
self.eval_data_loader = None
141+
else:
142+
self.eval_data_loader = self.strategy.experimental_distribute_dataset(self.eval_data)
140143
self.eval_steps_per_epoch = eval_dataset.total_steps
141144

142145
# -------------------------------- CHECKPOINTS -------------------------------------

0 commit comments

Comments
 (0)