Skip to content

Commit

Permalink
Update sac_agent.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Denys88 authored Jun 27, 2022
1 parent d5290c6 commit a9336bd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions rl_games/algos_torch/sac_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,8 @@ def get_weights(self):
return state

def save(self, fn):
pass
#state = self.get_full_state_weights()
#torch_ext.save_checkpoint(fn, state)
state = self.get_full_state_weights()
torch_ext.save_checkpoint(fn, state)

def set_weights(self, weights):
self.model.sac_network.actor.load_state_dict(weights['actor'])
Expand Down Expand Up @@ -544,4 +543,4 @@ def train(self):
print('MAX EPOCHS NUM!')
return self.last_mean_rewards, self.epoch_num

update_time = 0
update_time = 0

0 comments on commit a9336bd

Please sign in to comment.