7cebf32b75ef71ea8e367579c71fea84deaac91b,chainerrl/agents/dpp.py,AbstractDPP,_compute_y_and_t,#AbstractDPP#Any#Any#,48
Before Change
xp = cuda.get_array_module(qout.greedy_actions.data)
batch_actions = chainer.Variable(
xp.asarray([elem["action"] for elem in experiences]))
// Q(s_t,a_t)
batch_q = F.reshape(qout.evaluate_actions(
batch_actions), (batch_size, 1))
After Change
batch_q = F.reshape(qout.evaluate_actions(
batch_actions), (batch_size, 1))
with chainer.no_backprop_mode():
// Compute target values
target_qout = self.target_q_function(batch_state, test=True)
// Q"(s_t,a_t)
target_q = F.reshape(target_qout.evaluate_actions(
batch_actions), (batch_size, 1))
// LQ"(s_t,a)
target_q_expect = F.reshape(
self._l_operator(target_qout), (batch_size, 1))
// r + g * LQ"(s_{t+1},a)
batch_q_target = F.reshape(
self._compute_target_values(exp_batch, gamma), (batch_size, 1))
// Q"(s_t,a_t) + r + g * LQ"(s_{t+1},a) - LQ"(s_t,a)
t = target_q + batch_q_target - target_q_expect
return batch_q, t
class DPP(AbstractDPP):
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 3
Instances
Project Name: chainer/chainerrl
Commit Name: 7cebf32b75ef71ea8e367579c71fea84deaac91b
Time: 2017-01-15
Author: muupan@gmail.com
File Name: chainerrl/agents/dpp.py
Class Name: AbstractDPP
Method Name: _compute_y_and_t
Project Name: chainer/chainercv
Commit Name: b9f68a41583a7d05ddc43c2c902133be071cfd91
Time: 2017-06-03
Author: Hakuyume@users.noreply.github.com
File Name: examples/segnet/evaluate.py
Class Name:
Method Name: main
Project Name: chainer/chainerrl
Commit Name: 4e008e79147043207a5d0032aa771d7f811af0e1
Time: 2017-01-05
Author: muupan@gmail.com
File Name: chainerrl/agents/dqn.py
Class Name: DQN
Method Name: _compute_y_and_t
Project Name: chainer/chainerrl
Commit Name: 67d13b4ba91b23ad29f660aae68a01ddbd809530
Time: 2018-10-16
Author: muupan@gmail.com
File Name: chainerrl/agents/ppo.py
Class Name: PPO
Method Name: act_and_train
Project Name: chainer/chainerrl
Commit Name: 67d13b4ba91b23ad29f660aae68a01ddbd809530
Time: 2018-10-16
Author: muupan@gmail.com
File Name: chainerrl/agents/ppo.py
Class Name: PPO
Method Name: act