0bb6982bd06bf21de58e61f021626ade1c9b6101,ch14/04_train_ddpg.py,,,#,46
Before Change
actor_loss_v = -net.critic(states_v, cur_actions_v)
actor_loss_v = actor_loss_v.mean()
actor_loss_v.backward()
net.n_critic.zero_grad()
optimizer.step()
tb_tracker.track("loss_actor", actor_loss_v, frame_idx)
tgt_net.alpha_sync(alpha=1-1e-3)
After Change
test_env = gym.make(ENV_ID)
act_net = model.DDPGActor(env.observation_space.shape[0], env.action_space.shape[0])
crt_net = model.DDPGCritic(env.observation_space.shape[0], env.action_space.shape[0])
if args.cuda:
act_net.cuda()
crt_net.cuda()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 0bb6982bd06bf21de58e61f021626ade1c9b6101
Time: 2018-02-04
Author: max.lapan@gmail.com
File Name: ch14/04_train_ddpg.py
Class Name:
Method Name:
Project Name: facebookresearch/Horizon
Commit Name: 4d68a1e4435dfeb5884093aa91a33e1b34a909cc
Time: 2019-02-13
Author: kittipat@fb.com
File Name: ml/rl/training/_dqn_trainer.py
Class Name: _DQNTrainer
Method Name: train
Project Name: explosion/thinc
Commit Name: 4b0134242f0e79bcdb022623be29e1e7db5445fc
Time: 2020-01-04
Author: honnibal+gh@gmail.com
File Name: examples/scripts/ray_parallel.py
Class Name: DataWorker
Method Name: compute_gradients