f09a705de11b1b6ade4a7353f238e8f379d15ce5,ch09/04_pong_pg.py,,,#,47

Before Change


            m_grad_mean.append(grad_means / grad_count)

            if train_step_idx % 10 == 0:
                writer.add_scalar("baseline", np.mean(m_baseline), step_idx)
                writer.add_scalar("batch_scales", np.mean(m_batch_scales), step_idx)
                writer.add_scalar("loss_entropy", np.mean(m_loss_entropy), step_idx)
                writer.add_scalar("loss_policy", np.mean(m_loss_policy), step_idx)
                writer.add_scalar("loss_total", np.mean(m_loss_total), step_idx)

After Change


            batch_actions_t = torch.LongTensor(batch_actions)
            bs = np.array(batch_scales, dtype=np.float32)
            bs -= bs.mean()
            if abs(bs.std()) > 1e-5:
                bs /= bs.std()

            batch_scale_v = Variable(torch.from_numpy(bs))
            if args.cuda:
                states_v = states_v.cuda()
                batch_actions_t = batch_actions_t.cuda()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: f09a705de11b1b6ade4a7353f238e8f379d15ce5
Time: 2017-12-05
Author: max.lapan@gmail.com
File Name: ch09/04_pong_pg.py
Class Name:
Method Name:


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 7d138b5d523e538e97e51c04309dc84ca98cfbb6
Time: 2018-01-11
Author: max.lapan@gmail.com
File Name: ch12/train_scst.py
Class Name:
Method Name:


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 5bb63d23a7722d060f7df345a9d2b51dc98c035a
Time: 2017-12-03
Author: max.lapan@gmail.com
File Name: ch09/02_cartpole_reinforce.py
Class Name:
Method Name: