Skip to content

Commit

Permalink
easy fix (Denys88#145)
Browse files Browse the repository at this point in the history
Co-authored-by: Viktor Makoviichuk <[email protected]>
  • Loading branch information
Denys88 and DenSumy authored Apr 21, 2022
1 parent 16f5fdc commit a33b6c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rl_games/common/a2c_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def __init__(self, base_name, params):
else:
self.scheduler = schedulers.IdentityScheduler()

self.e_clip = nn.Parameter(torch.tensor(config['e_clip'], requires_grad=True, dtype=torch.float32, device= self.ppo_device), requires_grad=True)
self.e_clip = config['e_clip']
self.clip_value = config['clip_value']
self.network = config['network']
self.rewards_shaper = config['reward_shaper']
Expand Down Expand Up @@ -281,7 +281,7 @@ def write_stats(self, total_time, epoch_num, step_time, play_time, update_time,
self.writer.add_scalar('losses/entropy', torch_ext.mean_list(entropies).item(), frame)
self.writer.add_scalar('info/last_lr', last_lr * lr_mul, frame)
self.writer.add_scalar('info/lr_mul', lr_mul, frame)
self.writer.add_scalar('info/e_clip', self.e_clip.item() * lr_mul, frame)
self.writer.add_scalar('info/e_clip', self.e_clip * lr_mul, frame)
self.writer.add_scalar('info/kl', torch_ext.mean_list(kls).item(), frame)
self.writer.add_scalar('info/epochs', epoch_num, frame)
self.algo_observer.after_print_stats(frame, epoch_num, total_time)
Expand Down

0 comments on commit a33b6c4

Please sign in to comment.