Skip to content

Commit

Permalink
Update TD3.py
Browse files Browse the repository at this point in the history
  • Loading branch information
XinJingHao authored Jun 8, 2024
1 parent fbd0ec3 commit 7363bf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 4.2 TD3/TD3.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def save(self,EnvName, timestep):
torch.save(self.q_critic.state_dict(), "./model/{}_q_critic{}.pth".format(EnvName,timestep))

def load(self,EnvName, timestep):
self.actor.load_state_dict(torch.load("./model/{}_actor{}.pth".format(EnvName, timestep)))
self.q_critic.load_state_dict(torch.load("./model/{}_q_critic{}.pth".format(EnvName, timestep)))
self.actor.load_state_dict(torch.load("./model/{}_actor{}.pth".format(EnvName, timestep), map_location=self.dvc))
self.q_critic.load_state_dict(torch.load("./model/{}_q_critic{}.pth".format(EnvName, timestep), map_location=self.dvc))


class ReplayBuffer():
Expand Down

0 comments on commit 7363bf2

Please sign in to comment.