提交 0c908293 编写于 作者: X xiaowei_xing

test

上级 ab581c0d
......@@ -66,7 +66,7 @@ $$
$$
$$
= \mathbb{E}_ {\tau\sim\pi_{\theta}(\tau)}[\nabla_{\theta}\log\pi_{\theta}(\tau)r(\tau)]
= \mathbb{E}_ {\tau\sim\pi_{\theta}(\tau)}[\nabla_{\theta}\log\pi_{\theta}(\tau)r(\tau)]
$$
通过对数导数技巧,我们将梯度从期望之外转移到了期望之内。这样做的好处就是,我们不再需要对状态转移函数求梯度,正如下面我们将看到的。
......@@ -87,5 +87,20 @@ $$
$$
$$
\approx \frac{1}{N} \sum_{i=1}^{N} \sum_{t=1}^{T} (\nabla_{\theta} (\log\pi_{\theta}(a_{i,t|}|s_{i,t}))(\sum_{t=1}^{T}\gamma^t r(s_{i,t},a_{i,t})))
$$
\ No newline at end of file
\approx \frac{1}{N} \sum_{i=1}^{N} \sum_{t=1}^{T} (\nabla_{\theta} (\log\pi_{\theta}(a_{i,t}|s_{i,t}))(\sum_{t=1}^{T}\gamma^t r(s_{i,t},a_{i,t})))。
$$
在第三个等式中,不包含 $\theta$ 的项被去掉。最后一步,我们应用了蒙特卡洛估计。
注意,在监督学习的设定下,上述式子与最大似然估计(Maximum Likelihood Estimate,MLE)有很多相似之处,例如,对于监督学习中的 MLE,我们有概率 $J'(\theta)$ 和对数概率 $J(\theta)$:
$$
J'(\theta) = \prod_{i=1}^{N}P(y_i|x_i),
$$
$$
J(\theta) = \log J'(\theta) = \sum_{i=1}^{N}\log P(y_i|x_i),
$$
$$
\nabla_{theta}J(\theta) = \sum_{i=1}^{N} \nabla_{\theta}\log P(y_i|x_i)。
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册