Skip to content

Commit

Permalink
bug fix on critic input
Browse files Browse the repository at this point in the history
  • Loading branch information
sfujim authored Mar 1, 2018
1 parent 1204ff8 commit 0316ba9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DDPG.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def train(self, replay_buffer, iterations, batch_size=64, discount=0.99, tau=0.0
target_Q = reward + (done * discount * target_Q)

# Get current Q estimate
current_Q = self.critic([state, action])
current_Q = self.critic(state, action)

# Compute critic loss
critic_loss = self.criterion(current_Q, target_Q)
Expand Down Expand Up @@ -131,4 +131,4 @@ def save(self, filename, directory):

def load(self, filename, directory):
self.actor.load_state_dict(torch.load('%s/%s_actor.pth' % (directory, filename)))
self.critic.load_state_dict(torch.load('%s/%s_critic.pth' % (directory, filename)))
self.critic.load_state_dict(torch.load('%s/%s_critic.pth' % (directory, filename)))

0 comments on commit 0316ba9

Please sign in to comment.