Commit f9fa133d by xuchen

fix the bug of conformer

parent 0140d73d
......@@ -9,9 +9,12 @@ Fairseq_ST基于原始的Fairseq,提高了程序易用性以及对语音到文
- 针对每个数据集创建egs文件夹保存运行脚本,目前包括LibriSpeech语音识别数据集和MuST-C语音翻译数据集
- 通过读取yaml配置文件进行训练
- 支持ctc多任务学习
- 使用ST相似的流程训练MT模型(在线分词)
后续目标:
- 速度扰动
- MT pipeline(bin)
- 相对位置表示
- Conformer模型结构
- 预训练模型加载
......
......@@ -211,12 +211,14 @@ class ConformerEncoderLayer(nn.Module):
# convolution module
if self.conv_module is not None:
x = x.transpose(0, 1)
residual = x
if self.normalize_before:
x = self.conv_norm(x)
x = residual + self.dropout_module(self.conv_module(x))
if not self.normalize_before:
x = self.conv_norm(x)
x = x.transpose(0, 1)
residual = x
if self.normalize_before:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论