导入
通过SeqGAN进行文本生成
探索通过SeqGAN与自然语言处理进行文本生成的概念。
循环神经网络的基本计算单元
h_1 = F(U_{x_1} + Wh_0 + b)
h_2 = F(U_{x_2} + Wh_1 + b)
h_3 = F(U_{x_3} + Wh_2 + b)
y_1 = softmax(Vh_1 + c)
y_2 = softmax(Vh_2 + c)
y_3 = softmax(Vh_3 + c)
LSTM 的计算过程
f_t = sigmoid(W_f · [h_{t-1}, x_t] + b_f)
i_t = sigmoid(W_i · [h_{t-1}, x_t] + b_i)
j_t = tanh(W_j · [h_{t-1}, x_t] + b_j)
C_t = f_t · C_{t-1} + i_t · j_t
o_t = sigmoid(W_o · [h_{t-1}, x_t] + b_o)
h_t = o_t · tanh(C_t)
Coming soon to support pageflux-note
SeqGAN 模型架构
J(θ) = 𝔼[R_T | s_0, θ] = ∑_{y ∈ Y} G_θ(y | s_0) · Q(s_0, y)
蒙特卡洛树搜索的完整步骤
Q(s=Y_{1:t−1}, a=y_t) = { (1/N) ∑{n=1}^N D(Ỹ{1:T}), Ỹ_{1:T} ∈ MC(Y_{1:t}), t < T D(Y_{1:t}), t = T }