From ddeac78759f2e250ed4b21310e5c3c48e7f3ca81 Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Tue, 3 Dec 2019 19:59:05 +0800 Subject: [PATCH] fix asr output name --- delta/models/asr_model.py | 2 +- egs/hkust/asr/v1/conf/asr-ctc.yml | 22 +--------------------- egs/mini_an4/asr/v1/conf/asr-ctc.yml | 22 +--------------------- 3 files changed, 3 insertions(+), 43 deletions(-) diff --git a/delta/models/asr_model.py b/delta/models/asr_model.py index 6214854c..852a9973 100644 --- a/delta/models/asr_model.py +++ b/delta/models/asr_model.py @@ -244,7 +244,7 @@ def build(self): x) # Output layer with softmax - x = TimeDistributed(Dense(self._vocab_size))(x) + x = TimeDistributed(Dense(self._vocab_size), name="outputs")(x) input_length = Input(name='input_length', shape=[], dtype='int64') labels = Input(name='targets', shape=[None], dtype='int32') diff --git a/egs/hkust/asr/v1/conf/asr-ctc.yml b/egs/hkust/asr/v1/conf/asr-ctc.yml index 1d729722..5cd4861e 100644 --- a/egs/hkust/asr/v1/conf/asr-ctc.yml +++ b/egs/hkust/asr/v1/conf/asr-ctc.yml @@ -36,7 +36,7 @@ data: batch_strategy: auto # strategy to count maximum size of batch(support 4 values: "auto", "seq", "frame", "bin") batch_mode: true # ture, user control batch; false, `generate` will yeild one example num_parallel_calls: 10 - num_prefetch_batch: 2 + num_prefetch_batch: 20 shuffle_buffer_size: 2000 need_shuffle: true sortagrad: true @@ -58,10 +58,6 @@ model: solver: name: AsrSolver - adversarial: - enable: false # whether to using adversiral training - adv_alpha: 0.5 # adviseral alpha of loss - adv_epslion: 0.1 # adviseral example epslion model_average: enable: false # use average model var_avg_decay: 0.99 # the decay rate of varaibles @@ -96,17 +92,6 @@ solver: cals: - name: AccuracyCal arguments: null - - name: ConfusionMatrixCal - arguments: null - - name: PrecisionCal - arguments: - average: 'binary' - - name: RecallCal - arguments: - average: 'binary' - - name: F1ScoreCal - arguments: - average: 'binary' postproc: enbale: false name: EmoPostProc @@ -114,11 +99,6 @@ solver: eval: true # compute metrics infer: true # get predict results pred_path: null # None for `model_path`/infer, dumps infer output to this dir - thresholds: - - 0.5 - smoothing: - enable: true - count: 2 saver: model_path: "exp/asr-ctc/ckpt" max_to_keep: 10 diff --git a/egs/mini_an4/asr/v1/conf/asr-ctc.yml b/egs/mini_an4/asr/v1/conf/asr-ctc.yml index 875d12d7..9345aae2 100644 --- a/egs/mini_an4/asr/v1/conf/asr-ctc.yml +++ b/egs/mini_an4/asr/v1/conf/asr-ctc.yml @@ -36,7 +36,7 @@ data: batch_strategy: auto # strategy to count maximum size of batch(support 4 values: "auto", "seq", "frame", "bin") batch_mode: true # ture, user control batch; false, `generate` will yeild one example num_parallel_calls: 10 - num_prefetch_batch: 2 + num_prefetch_batch: 20 shuffle_buffer_size: 2000 need_shuffle: true sortagrad: true @@ -58,10 +58,6 @@ model: solver: name: AsrSolver - adversarial: - enable: false # whether to using adversiral training - adv_alpha: 0.5 # adviseral alpha of loss - adv_epslion: 0.1 # adviseral example epslion model_average: enable: false # use average model var_avg_decay: 0.99 # the decay rate of varaibles @@ -96,17 +92,6 @@ solver: cals: - name: AccuracyCal arguments: null - - name: ConfusionMatrixCal - arguments: null - - name: PrecisionCal - arguments: - average: 'binary' - - name: RecallCal - arguments: - average: 'binary' - - name: F1ScoreCal - arguments: - average: 'binary' postproc: enbale: false name: EmoPostProc @@ -114,11 +99,6 @@ solver: eval: true # compute metrics infer: true # get predict results pred_path: null # None for `model_path`/infer, dumps infer output to this dir - thresholds: - - 0.5 - smoothing: - enable: true - count: 2 saver: model_path: "exp/asr-ctc/ckpt" max_to_keep: 10