fix bug
This commit is contained in:
parent
09607561cc
commit
e95985d456
|
@ -34,7 +34,7 @@ class ModelSpeech(): # 语音模型类
|
||||||
初始化
|
初始化
|
||||||
默认输出的拼音的表示大小是1283,即1282个拼音+1个空白块
|
默认输出的拼音的表示大小是1283,即1282个拼音+1个空白块
|
||||||
'''
|
'''
|
||||||
MS_OUTPUT_SIZE = 1417
|
MS_OUTPUT_SIZE = 1419
|
||||||
self.MS_OUTPUT_SIZE = MS_OUTPUT_SIZE # 神经网络最终输出的每一个字符向量维度的大小
|
self.MS_OUTPUT_SIZE = MS_OUTPUT_SIZE # 神经网络最终输出的每一个字符向量维度的大小
|
||||||
#self.BATCH_SIZE = BATCH_SIZE # 一次训练的batch
|
#self.BATCH_SIZE = BATCH_SIZE # 一次训练的batch
|
||||||
self.label_max_string_length = 64
|
self.label_max_string_length = 64
|
||||||
|
@ -87,7 +87,7 @@ class ModelSpeech(): # 语音模型类
|
||||||
#layer_h5 = LSTM(256, activation='relu', use_bias=True, return_sequences=True)(layer_h4) # LSTM层
|
#layer_h5 = LSTM(256, activation='relu', use_bias=True, return_sequences=True)(layer_h4) # LSTM层
|
||||||
#layer_h6 = Dropout(0.2)(layer_h5) # 随机中断部分神经网络连接,防止过拟合
|
#layer_h6 = Dropout(0.2)(layer_h5) # 随机中断部分神经网络连接,防止过拟合
|
||||||
layer_h8 = Dense(256, activation="relu", use_bias=True, kernel_initializer='he_normal')(layer_h7) # 全连接层
|
layer_h8 = Dense(256, activation="relu", use_bias=True, kernel_initializer='he_normal')(layer_h7) # 全连接层
|
||||||
layer_h9 = Dense(1417, use_bias=True, kernel_initializer='he_normal')(layer_h8) # 全连接层
|
layer_h9 = Dense(self.MS_OUTPUT_SIZE, use_bias=True, kernel_initializer='he_normal')(layer_h8) # 全连接层
|
||||||
|
|
||||||
y_pred = Activation('softmax', name='Activation0')(layer_h9)
|
y_pred = Activation('softmax', name='Activation0')(layer_h9)
|
||||||
model_data = Model(inputs = input_data, outputs = y_pred)
|
model_data = Model(inputs = input_data, outputs = y_pred)
|
||||||
|
|
1
dict.txt
1
dict.txt
|
@ -703,6 +703,7 @@ nin2 您
|
||||||
ning2 柠狞凝宁拧咛
|
ning2 柠狞凝宁拧咛
|
||||||
ning3 拧
|
ning3 拧
|
||||||
ning4 拧泞宁
|
ning4 拧泞宁
|
||||||
|
ni1 妞
|
||||||
niu2 牛
|
niu2 牛
|
||||||
niu3 扭钮纽
|
niu3 扭钮纽
|
||||||
nin4 拗
|
nin4 拗
|
||||||
|
|
|
@ -74,9 +74,9 @@ class DataSpeech():
|
||||||
filename_symbollist_thchs30 = 'thchs30' + self.slash + 'train.syllable.txt'
|
filename_symbollist_thchs30 = 'thchs30' + self.slash + 'train.syllable.txt'
|
||||||
filename_symbollist_stcmds = 'st-cmds' + self.slash + 'train.syllable.txt'
|
filename_symbollist_stcmds = 'st-cmds' + self.slash + 'train.syllable.txt'
|
||||||
elif(self.type=='dev'):
|
elif(self.type=='dev'):
|
||||||
filename_wavlist_thchs30 = 'thchs30' + self.slash + 'dev.wav.lst'
|
filename_wavlist_thchs30 = 'thchs30' + self.slash + 'cv.wav.lst'
|
||||||
filename_wavlist_stcmds = 'st-cmds' + self.slash + 'dev.wav.txt'
|
filename_wavlist_stcmds = 'st-cmds' + self.slash + 'dev.wav.txt'
|
||||||
filename_symbollist_thchs30 = 'thchs30' + self.slash + 'dev.syllable.txt'
|
filename_symbollist_thchs30 = 'thchs30' + self.slash + 'cv.syllable.txt'
|
||||||
filename_symbollist_stcmds = 'st-cmds' + self.slash + 'dev.syllable.txt'
|
filename_symbollist_stcmds = 'st-cmds' + self.slash + 'dev.syllable.txt'
|
||||||
elif(self.type=='test'):
|
elif(self.type=='test'):
|
||||||
filename_wavlist_thchs30 = 'thchs30' + self.slash + 'test.wav.lst'
|
filename_wavlist_thchs30 = 'thchs30' + self.slash + 'test.wav.lst'
|
||||||
|
|
Loading…
Reference in New Issue