Skip to content

Commit

Permalink
Fix #789 ignore DocvecsArray.doctag_syn0norm in save (#1053)
Browse files Browse the repository at this point in the history
  • Loading branch information
accraze authored and tmylk committed Jan 25, 2017
1 parent 2a70e3a commit 3cb735b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gensim/models/doc2vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,11 @@ def __contains__(self, index):
else:
return index in self.doctags

def save(self, *args, **kwargs):
# don't bother storing the cached normalized vectors
kwargs['ignore'] = kwargs.get('ignore', ['syn0norm'])
super(DocvecsArray, self).save(*args, **kwargs)

def borrow_from(self, other_docvecs):
self.count = other_docvecs.count
self.doctags = other_docvecs.doctags
Expand Down

0 comments on commit 3cb735b

Please sign in to comment.