File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ decoder_config:
3131 beam_width : 0
3232 norm_score : True
3333 corpus_files :
34- - /mnt/Data /MLDL/Datasets/ASR/Raw/LibriSpeech/train-clean-100/transcripts.tsv
34+ - /h /MLDL/Datasets/ASR/Raw/LibriSpeech/train-clean-100/transcripts.tsv
3535
3636model_config :
3737 name : conformer
@@ -75,8 +75,8 @@ learning_config:
7575 num_masks : 1
7676 mask_factor : 27
7777 data_paths :
78- - /mnt/Data /MLDL/Datasets/ASR/Raw/LibriSpeech/train-clean-100/transcripts.tsv
79- tfrecords_dir : /mnt/Data/MLDL/Datasets/ASR/Raw/LibriSpeech/tfrecords_1030
78+ - /h /MLDL/Datasets/ASR/Raw/LibriSpeech/train-clean-100/transcripts.tsv
79+ tfrecords_dir : null
8080 shuffle : True
8181 cache : True
8282 buffer_size : 100
@@ -86,7 +86,7 @@ learning_config:
8686 eval_dataset_config :
8787 use_tf : True
8888 data_paths : null
89- tfrecords_dir : /mnt/Data/MLDL/Datasets/ASR/Raw/LibriSpeech/tfrecords_1030
89+ tfrecords_dir : null
9090 shuffle : False
9191 cache : True
9292 buffer_size : 100
@@ -113,13 +113,13 @@ learning_config:
113113 batch_size : 2
114114 num_epochs : 50
115115 checkpoint :
116- filepath : /mnt/Miscellanea /Models/local/conformer/checkpoints/{epoch:02d}.h5
116+ filepath : /d /Models/local/conformer/checkpoints/{epoch:02d}.h5
117117 save_best_only : False
118118 save_weights_only : True
119119 save_freq : epoch
120- states_dir : /mnt/Miscellanea /Models/local/conformer/states
120+ states_dir : /d /Models/local/conformer/states
121121 tensorboard :
122- log_dir : /mnt/Miscellanea /Models/local/conformer/tensorboard
122+ log_dir : /d /Models/local/conformer/tensorboard
123123 histogram_freq : 1
124124 write_graph : True
125125 write_images : True
Original file line number Diff line number Diff line change @@ -67,6 +67,14 @@ def __init__(self, config: dict = None):
6767 self .num_epochs = config .pop ("num_epochs" , 20 )
6868 for k , v in config .items ():
6969 setattr (self , k , v )
70+ if k == "checkpoint" :
71+ if v and v .get ("filepath" ):
72+ file_util .preprocess_paths (v .get ("filepath" ))
73+ elif k == "states_dir" and v :
74+ file_util .preprocess_paths (v )
75+ elif k == "tensorboard" :
76+ if v and v .get ("log_dir" ):
77+ file_util .preprocess_paths (v .get ("log_dir" ))
7078
7179
7280class LearningConfig :
You can’t perform that action at this time.
0 commit comments