网易企业邮箱电话,网站百度搜索情况和反链接优化建议,wordpress缓存插件比拼,一个新品牌如何推广李宏毅 DLHLP 深度学习人类语言处理 HW1 相关资料HW1更多尝试1, 加深encoder:4层LSTM2, 加深encoder(4层LSTM)和加深decoder(2层LSTM)3, cnn代替vgg4, 再次加深decoder(4层LSTM) 语音小白在网上没有找到这门课的作业分享#xff0c;那就记录一下自己的作业吧。
相关资料
课程… 李宏毅 DLHLP 深度学习人类语言处理 HW1 相关资料HW1更多尝试1, 加深encoder:4层LSTM2, 加深encoder(4层LSTM)和加深decoder(2层LSTM)3, cnn代替vgg4, 再次加深decoder(4层LSTM) 语音小白在网上没有找到这门课的作业分享那就记录一下自己的作业吧。
相关资料
课程官网https://speech.ee.ntu.edu.tw/~hylee/dlhlp/2020-spring.php 作业github代码1https://github.com/Alexander-H-Liu/End-to-end-ASR-Pytorch 作业github代码2https://github.com/DLHLP2020/hw1-speech-recognition/tree/master 其中代码1是你用来跑模型写作业的代码代码2只是辅助帮你eval结果和把答案转换成提交要求格式。 提交作业kaggle网站https://www.kaggle.com/competitions/dlhlp2020spring-asr/leaderboard 目前还是可以提交的选late submmission不会参与打榜。
首先大家好好听课然后按照课件说明去下载作业slide、数据、github代码最后按照作业slide一步一步往下走就可以。作业总体思路就是尝试不同元素的LAS模型 Listen encoder Attention Attention Spell Decoder
在作业里会让你尝试 1用最基础的seq2seq 2在训练模型时encoder部分叠加使用CTC别的部分保持不变所以loss会变成CTCseq2seq混合loss 3CTC joint的模型decoder只用CTC 4decoder部分借助LM 5不同beam size的效果
HW1
1Train a seq2seq attention-based ASR model. Paste the learning curve and alignment plot from tensorboard. Report the CER/WER of dev set and kaggle score of testing set. (2 points)
一开始的时候成绩很烂啦虽然alignment plot看起来还挺合理的不过打不过baseline 提交到kaggle上成绩是这样的比baseline烂不少
2Repeat 1. by training a joint CTC-attention ASR model (decoding with seq2seq decoder). Which model converges faster? Explain why. (2 points)
这里我用的CTC weight是0.3可以看到joint CTC-attention ASR收敛更快而且模型效果更好。网上搜了一下大概原因是ASR中attention是非常非常灵活的joint CTC-attention相当于在前期encoder部分就做了对齐所以会更快收敛效果也更好。
这个时候结果已经可以比baseline好了3Use the model in 2. to decode only in CTC (ctc_weight1.0). Report the CER/WER of dev set and kaggle score of testing set. Which model performs better in 1. 2. 3.? Explain why. (2 points)
1,2,3里面应该是2结果最好因为2的decode有了CTC的帮助但3中纯粹用CTC decode的话就像老师在课上讲的CTC不考虑前面的输出效果不会特别好往往需要后处理。
作业slide里面说CTC decode后的结果要再处理一下但是我看结果没有什么重复和空的地方应该是助教后期写好了吧以下是eval的结果
kaggle提交结果如下还挺惊讶3的效果比1好。
4Train an external language model. Use it to help the model in 1. to decode. Report the CER/WER of dev set and kaggle score of testing set. (2 points)
这里我的lm训练了超级久都没有结束但我看ckpt里面模型早就不再更新所以就手动停止了程序。 decode的时候我的lm weight取的0.5。最后的结果只能说比1提升了一点吧比不过CTC离baseline还很远可能是我的LM不太好的原因。
5Try decoding the model in 4. with different beam size (e.g. 2, 5, 10, 20). Which beam size is the best? (2 points)
这里我只有beam size从2加到5的时候private score有了一个相对明显的提升beam size再提升的时候效果就不再提升反而略微下降。用2中的model尝试了beam size 5和10不知道为什么也没有见到模型效果的提升。
beam size 5
beam size 10 beam size 20
更多尝试
1, 加深encoder:4层LSTM
因为作业2中的模型效果最好(CTC joint 训练decoder时只使用seq2seq不使用CTC)首先先尝试在这个基础上加深encoder重新训练从一开始的2层LSTM加深为4层LSTM encoder:prenet: vgg # vgg/cnn/# vgg: True # 4x reduction on time feature extractionmodule: LSTM # LSTM/GRU/Transformerbidirection: Truedim: [512,512,512,512]dropout: [0,0,0,0]layer_norm: [False,False,False,False]proj: [True,True,True,True] # Linear projection Tanh after each rnn layersample_rate: [1,1,1,1]sample_style: drop # drop/concat最后效果如下 beam size 10 提升不明显看Loss训练时收敛得慢一些
2, 加深encoder(4层LSTM)和加深decoder(2层LSTM)
在尝试1的基础上加深decoder从原来的1层LSTM变为2层LSTM效果有了一个明显的提升
3, cnn代替vgg
encoder中的vgg使用cnn其余与2中相同
4, 再次加深decoder(4层LSTM)
在尝试2的基础上再次加深decoder从2层LSTM变为4层LSTM效果变差了