d5b0cd8e7960c247bb7c5b7c832358f8831780fb,ch15/04_train_ppo.py,,calc_adv_ref,#,59

Before Change


        result_ref.append(last_gae + val)

    adv_v = Variable(torch.FloatTensor(list(reversed(result_adv))))
    ref_v = Variable(torch.FloatTensor(list(reversed(result_ref))))
    if cuda:
        adv_v = adv_v.cuda()
        ref_v = ref_v.cuda()
    return adv_v, ref_v


if __name__ == "__main__":

After Change


        result_ref.append(last_gae + val)

    adv_v = torch.FloatTensor(list(reversed(result_adv))).to(device)
    ref_v = torch.FloatTensor(list(reversed(result_ref))).to(device)
    return adv_v, ref_v

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: d5b0cd8e7960c247bb7c5b7c832358f8831780fb
Time: 2018-04-29
Author: max.lapan@gmail.com
File Name: ch15/04_train_ppo.py
Class Name:
Method Name: calc_adv_ref


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: d5b0cd8e7960c247bb7c5b7c832358f8831780fb
Time: 2018-04-29
Author: max.lapan@gmail.com
File Name: ch15/03_train_trpo.py
Class Name:
Method Name: calc_adv_ref


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: d5b0cd8e7960c247bb7c5b7c832358f8831780fb
Time: 2018-04-29
Author: max.lapan@gmail.com
File Name: ch15/04_train_ppo.py
Class Name:
Method Name: calc_adv_ref