Skip to content

Commit

Permalink
fix: path error when saving checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Clarivy authored May 13, 2023
1 parent 362fd12 commit e1834a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rlcard/agents/nfsp_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
See the paper https://arxiv.org/abs/1603.01121 for more details.
'''

import os
import random
import collections
import enum
Expand Down Expand Up @@ -370,7 +371,7 @@ def save_checkpoint(self, path, filename='checkpoint_nfsp.pt'):
Args:
path (str): the path to save the model
'''
torch.save(self.checkpoint_attributes(), path + '/' + filename)
torch.save(self.checkpoint_attributes(), os.path.join(path, filename))


class AveragePolicyNetwork(nn.Module):
Expand Down

0 comments on commit e1834a9

Please sign in to comment.