Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
jason.yoon authored and lucas(김광섭) committed Aug 29, 2019
1 parent 1a6c57f commit 98844f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion buffalo/algo/als.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def __init__(self, opt_path=None, *args, **kwargs):
self.obj = CuALS() if self.opt.accelerator else CyALS()
assert self.obj.init(bytes(self.opt_path, 'utf-8')),\
'cannot parse option file: %s' % opt_path
self.vdim = self.obj.get_vdim() if self.opt.accelerator else self.opt.d
self.data = None
data = kwargs.get('data')
data_opt = self.opt.get('data_opt')
Expand Down Expand Up @@ -75,6 +74,7 @@ def normalize(self, group='item'):
self.opt._nrz_P = True

def initialize(self):
self.vdim = self.obj.get_vdim() if self.opt.accelerator else self.opt.d
super().initialize()
self.init_factors()

Expand Down
2 changes: 1 addition & 1 deletion buffalo/algo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def periodical(self, period, current):

def save_best_only(self, loss, best_loss, i):
if self.opt.save_best and best_loss > loss and self.periodical(self.opt.save_period, i):
self.save(self.model_path)
self.save(self.opt.model_path)
return loss
return best_loss

Expand Down

0 comments on commit 98844f4

Please sign in to comment.