deeplearning.ai - 序列模型和注意力机制

序列模型
吴恩达 Andrew Ng

Sequence models & Attention mechanism

Various sequence to sequence architectures

Basic Models

  • sequence to sequence model
  • image captioning 图像描述

Picking the most likely sentence

  • condition language model

    这里写图片描述

  • just pick one word at a time (greedy search) is not always optimal

  • approximate search algorithm

Beam Search 集束搜索

  • coalition 编码,decodlition 解码

  • beam width (B)集束宽,候选词的个数

  • record top B possiblities of sentences

  • 步骤
    这里写图片描述
    这里写图片描述
    这里写图片描述
  • 1TαyTyy=1logP(y<t>|x,y<1>,,y<t1>) 1 T y α ∑ y = 1 T y log ⁡ P ( y < t > | x , y < 1 > , ⋯ , y < t − 1 > )

    • length normalization 长度归一化
      这里写图片描述

    • numerical underflow 数值下溢,rounding error 四舍五入的误差

    • α α 是超参数

    • normalized log likelihood objective 归一化的对数似然目标函数

  • large B: better result but computationally slower

  • small B: worse result but faster

  • Beam Search is not guaranteed to find exact maximum for argmaxyP(y|x) a r g max y P ( y | x )

Bleu Score (optional)

  • give a score to measure how good is the machine translation
  • Bleu score on unigrams (一元词组), bigrams (二元词组)
  • BP: brevity penalty 简短惩罚
  • single real number evaluation metric 单一实数评估指标

Attention Model Intuition (注意力模型)

  • 神经网络很难记忆长句子

  • 一部分一部分来机器翻译

  • 这里写图片描述

Attention Model

这里写图片描述

Speech recognition - Audio data

Speech recognition

  • ​false blank outputs 伪空白输出

  • phonemes, hand-engineered basic units of cells

  • end-to-end network, input an audio clip and directly output a transcript

  • Connectionist Temporal Classification cost function

    collapse repeated characters not separated by “blank”

Trigger Word Detection 触发字检测

label​

这里写图片描述

Conclusion

Conclusion and thank you

Make the world a better place.​

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值