File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ def __init__(
3838 mel_length_threshold = 0 ,
3939 ):
4040 """Initialize dataset.
41-
4241 Args:
4342 root_dir (str): Root directory including dumped files.
4443 audio_query (str): Query to find audio files in root_dir.
@@ -48,7 +47,6 @@ def __init__(
4847 audio_length_threshold (int): Threshold to remove short audio files.
4948 mel_length_threshold (int): Threshold to remove short feature files.
5049 return_utt_id (bool): Whether to return the utterance id with arrays.
51-
5250 """
5351 # find all of audio and mel files.
5452 audio_files = sorted (find_files (root_dir , audio_query ))
@@ -117,7 +115,9 @@ def create(
117115 datasets = tf .data .Dataset .from_generator (
118116 self .generator , output_types = output_types , args = (self .get_args ())
119117 )
120-
118+ options = tf .data .Options ()
119+ options .experimental_distribute .auto_shard_policy = tf .data .experimental .AutoShardPolicy .OFF
120+ datasets = datasets .with_options (options )
121121 # load dataset
122122 datasets = datasets .map (
123123 lambda items : self ._load_data (items ), tf .data .experimental .AUTOTUNE
You can’t perform that action at this time.
0 commit comments