93d87b907ff5ef42753492c79e602b31f9e7df00,chainerrl/agents/categorical_dqn.py,CategoricalDQN,_compute_loss,#CategoricalDQN#Any#Any#Any#,128

Before Change


        // Minimize the cross entropy
        // y is clipped to avoid log(0)
        eltwise_loss = -t * F.log(F.clip(y, 1e-10, 1.))
        if self.batch_accumulator == "sum":
            loss = F.sum(eltwise_loss)
        else:
            loss = F.mean(F.sum(eltwise_loss, axis=1))
        return loss

After Change


        if errors_out is not None:
            del errors_out[:]
            delta = F.sum(eltwise_loss, axis=1)
            delta = cuda.to_cpu(delta.array)
            for e in delta:
                errors_out.append(e)

        if "weights" in exp_batch:
            return compute_weighted_value_loss(
                y, t, exp_batch["weights"],
                clip_delta=self.clip_delta,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: chainer/chainerrl
Commit Name: 93d87b907ff5ef42753492c79e602b31f9e7df00
Time: 2018-11-03
Author: seann999@gmail.com
File Name: chainerrl/agents/categorical_dqn.py
Class Name: CategoricalDQN
Method Name: _compute_loss


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/chainercv
Commit Name: d37d08d9b2a806b3345fba41711c0d517b92a65c
Time: 2017-06-15
Author: yuyuniitani@gmail.com
File Name: chainercv/links/model/vgg/vgg16.py
Class Name: VGG16Layers
Method Name: predict