Skip to content

Commit

Permalink
#22 minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
suragnair committed Jan 19, 2018
1 parent 668a0e5 commit 610fa37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion othello/pytorch/NNet.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,6 @@ def load_checkpoint(self, folder='checkpoint', filename='checkpoint.pth.tar'):
# https://github.com/pytorch/examples/blob/master/imagenet/main.py#L98
filepath = os.path.join(folder, filename)
if not os.path.exists(filepath):
raise("No model in path {}".format(checkpoint))
raise("No model in path {}".format(filepath))
checkpoint = torch.load(filepath)
self.nnet.load_state_dict(checkpoint['state_dict'])
2 changes: 1 addition & 1 deletion pit.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# nnet players
n1 = NNet(g)
n1.load_checkpoint('./pretrained_models/','6x100x25_best.pth.tar')
n1.load_checkpoint('./pretrained_models/othello/pytorch/','6x100x25_best.pth.tar')
args1 = dotdict({'numMCTSSims': 50, 'cpuct':1.0})
mcts1 = MCTS(g, n1, args1)
n1p = lambda x: np.argmax(mcts1.getActionProb(x, temp=0))
Expand Down

0 comments on commit 610fa37

Please sign in to comment.