35a7a5b27a93a2442f82628abd18d47200901f3d,torch_ac/algos/ppo.py,PPOAlgo,update_parameters,#PPOAlgo#,20

Before Change



                // Compute loss

                rdist, value = self.acmodel.get_rdist_n_value(Variable(b.obs))

                log_dist = F.log_softmax(rdist, dim=1)
                dist = F.softmax(rdist, dim=1)

After Change


                // Compute loss

                rdist = self.acmodel.get_rdist(Variable(b.obs))
                value = self.acmodel.get_value(Variable(b.obs))

                log_dist = F.log_softmax(rdist, dim=1)
                dist = F.softmax(rdist, dim=1)
                entropy = -(log_dist * dist).sum(dim=1).mean()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: lcswillems/torch-rl
Commit Name: 35a7a5b27a93a2442f82628abd18d47200901f3d
Time: 2018-04-16
Author: lcswillems@gmail.com
File Name: torch_ac/algos/ppo.py
Class Name: PPOAlgo
Method Name: update_parameters


Project Name: lcswillems/torch-rl
Commit Name: 35a7a5b27a93a2442f82628abd18d47200901f3d
Time: 2018-04-16
Author: lcswillems@gmail.com
File Name: torch_ac/algos/base.py
Class Name: BaseAlgo
Method Name: collect_transitions


Project Name: lcswillems/torch-rl
Commit Name: 35a7a5b27a93a2442f82628abd18d47200901f3d
Time: 2018-04-16
Author: lcswillems@gmail.com
File Name: torch_ac/algos/a2c.py
Class Name: A2CAlgo
Method Name: update_parameters