Skip to content

Commit

Permalink
Fix piskvorky#789 ignore DocvecsArray.doctag_syn0norm in save
Browse files Browse the repository at this point in the history
  • Loading branch information
accraze committed Dec 22, 2016
1 parent 1265809 commit d58c09d
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 d58c09d

Please sign in to comment.