Skip to content

Commit

Permalink
policy init bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilbarhate99 authored Sep 26, 2019
1 parent ff296df commit d620d75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PPO.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ def __init__(self, state_dim, action_dim, n_latent_var, lr, betas, gamma, K_epoc
self.K_epochs = K_epochs

self.policy = ActorCritic(state_dim, action_dim, n_latent_var).to(device)
self.optimizer = torch.optim.Adam(self.policy.parameters(),
lr=lr, betas=betas)
self.optimizer = torch.optim.Adam(self.policy.parameters(), lr=lr, betas=betas)
self.policy_old = ActorCritic(state_dim, action_dim, n_latent_var).to(device)
self.policy_old.load_state_dict(self.policy.state_dict())

self.MseLoss = nn.MSELoss()

Expand Down

0 comments on commit d620d75

Please sign in to comment.