TencentGameMate / chinese_speech_pretrain

chinese speech pretrained models
997 stars 84 forks source link

请问预训练好模型之后提取音频特征时加权求和的具体做法是什么? #19

Open zdaaaaa opened 2 years ago

zdaaaaa commented 2 years ago

如题

pengchengguo commented 1 year ago

你好,

假设预训练模型层数为12,想要 12 层的加权和,在下游任务训练时,初始化一个可学习参数 weight,shape = (12, 1),然后输入下游任务模型的特征为 12 层 特征和 weight 加权和,weight 是随着模型训练更新的。具体可参考 https://github.com/s3prl/s3prl/blob/main/s3prl/upstream/interfaces.py#L134 和 S3PRL 的论文。

zdaaaaa commented 1 year ago

感谢回答

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: Pengcheng Guo @.> 发送时间: 2022年11月7日 16:40 收件人: TencentGameMate/chinese_speech_pretrain @.> 抄送: zdaaaaa @.>, Author @.> 主题: Re: [TencentGameMate/chinese_speech_pretrain] 请问预训练好模型之后提取音频特征时加权求和的具体做法是什么? (Issue #19)

你好,

假设预训练模型层数为12,想要 12 层的加权和,在下游任务训练时,初始化一个可学习参数 weight,shape = (12, 1),然后输入下游任务模型的特征为 12 层 特征和 weight 加权和,weight 是随着模型训练更新的。具体可参考 https://github.com/s3prl/s3prl/blob/main/s3prl/upstream/interfaces.py#L134 和 S3PRL 的论文。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>