Skip to content

Commit

Permalink
bug with saving
Browse files Browse the repository at this point in the history
  • Loading branch information
manila95 committed Oct 5, 2023
1 parent 50b8790 commit 3821026
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cleanrl/ppo_continuous_action_wandb.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def train_risk(cfg, model, data, criterion, opt, device):
opt.step()

net_loss += loss.item()
torch.save(self.model.state_dict(), os.path.join(wandb.run.dir, "risk_model.pt"))
torch.save(model.state_dict(), os.path.join(wandb.run.dir, "risk_model.pt"))
wandb.save("risk_model.pt")
model.eval()
return net_loss
Expand Down

0 comments on commit 3821026

Please sign in to comment.