Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix asr output name #186

Merged
merged 1 commit into from
Dec 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion delta/models/asr_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
22 changes: 1 addition & 21 deletions egs/hkust/asr/v1/conf/asr-ctc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -96,29 +92,13 @@ 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
log_verbose: false
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
Expand Down
22 changes: 1 addition & 21 deletions egs/mini_an4/asr/v1/conf/asr-ctc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -96,29 +92,13 @@ 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
log_verbose: false
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
Expand Down