Show and Tell: A Neural Image Caption Generator

[Show and Tell: A Neural Image Caption Generator][https://arxiv.org/pdf/1411.4555v1.pdf]

概要

本文介绍了NIC算法,将CNN与LSTM结合,做了一件什么事呢。就是小学时的看图说话,利用CNN提取图片特征,并作为 t − 1 t_{-1} t1输入LSTM中,将描述性词汇转化为独热编码,利用嵌入模型做为 S t S_t St输入LSTM中。

公式

最大化似然函数:
θ ⋆ = arg ⁡ max ⁡ θ ∑ ( I , S ) log ⁡ p ( S ∣ I ; θ ) \theta^{\star}=\arg \max _{\theta} \sum_{(I, S)} \log p(S | I ; \theta) θ=argθmax(I,S)logp(SI;θ)
可能性:
log ⁡ p ( S ∣ I ) = ∑ t = 0 N log ⁡ p ( S t ∣ I , S 0 , … , S t − 1 ) \log p(S | I)=\sum_{t=0}^{N} \log p\left(S_{t} | I, S_{0}, \ldots, S_{t-1}\right) logp(SI)=t=0Nlogp(StI,S0,,St1)
在LSTM中:
h t + 1 = f ( h t , x t ) h_{t+1}=f\left(h_{t}, x_{t}\right) ht+1=f(ht,xt)

i t = σ ( W i x x t + W i m m t − 1 ) f t = σ ( W f x x t + W f m m t − 1 ) o t = σ ( W o x x t + W o m m t − 1 ) c t = f t ⊙ c t − 1 + i t ⊙ h ( W c x x t + W c m m t − 1 ) ( 7 ) m t = o t ⊙ c t p t + 1 = Softmax ⁡ ( m t ) \begin{aligned} i_{t} &=\sigma\left(W_{i x} x_{t}+W_{i m} m_{t-1}\right) \\ f_{t} &=\sigma\left(W_{f x} x_{t}+W_{f m} m_{t-1}\right) \\ o_{t} &=\sigma\left(W_{o x} x_{t}+W_{o m} m_{t-1}\right) \\ c_{t} &=f_{t} \odot c_{t-1}+i_{t} \odot h\left(W_{c x} x_{t}+W_{c m} m_{t-1}\right)(7) \\ m_{t} &=o_{t} \odot c_{t} \\ p_{t+1} &=\operatorname{Softmax}\left(m_{t}\right) \end{aligned} itftotctmtpt+1=σ(Wixxt+Wimmt1)=σ(Wfxxt+Wfmmt1)=σ(Woxxt+Wommt1)=ftct1+ith(Wcxxt+Wcmmt1)(7)=otct=Softmax(mt)

输入和输出:
x − 1 = C N N ( I ) x t = W e S t , t ∈ { 0 … N − 1 } p t + 1 = LSTM ⁡ ( x t ) , t ∈ { 0 … N − 1 } \begin{aligned} x_{-1} &=\mathrm{CNN}(I) \\ x_{t} &=W_{e} S_{t}, \quad t \in\{0 \ldots N-1\} \\ p_{t+1} &=\operatorname{LSTM}\left(x_{t}\right), \quad t \in\{0 \ldots N-1\} \end{aligned} x1xtpt+1=CNN(I)=WeSt,t{0N1}=LSTM(xt),t{0N1}

网络架构

NIC

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值