Skip to content

Commit

Permalink
Minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
olavurmortensen committed Oct 14, 2015
1 parent 6aece13 commit b0b398a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions gensim/models/word2vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ def worker_one_job(job, inits):
return False
# train & return tally
tally, raw_tally = self._do_train_job(items, alpha, inits, sentence_indeces)
progress_queue.put((len(items), tally, raw_tally)) # report progress
progress_queue.put((len(sentence_indeces) - 1, tally, raw_tally)) # report progress
return True

def worker_loop():
Expand Down Expand Up @@ -736,7 +736,7 @@ def worker_loop():
batch_size = 0
sentence_indeces = [0]
job_no = 0
MAX_WORDS_IN_BATCH = 1000 # NOTE: should be same as MAX_SENTENCE_LEN in word2vec_inner.pyx.
MAX_WORDS_IN_BATCH = 10000 # NOTE: should be same as MAX_SENTENCE_LEN in word2vec_inner.pyx.
MAX_NUM_SENTENCES = 1000 # TODO: should be in word2vec_inner.pyx as well. TODO: consider proper value.
# fill jobs queue with (sentence, alpha) job tuples
job_source = enumerate(sentences)
Expand Down
58 changes: 29 additions & 29 deletions gensim/models/word2vec_inner.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gensim/models/word2vec_inner.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ except ImportError:

REAL = np.float32

DEF MAX_SENTENCE_LEN = 1000
DEF MAX_SENTENCE_LEN = 10000
DEF MAX_NUM_SENTENCES = 1000

cdef scopy_ptr scopy=<scopy_ptr>PyCObject_AsVoidPtr(fblas.scopy._cpointer) # y = x
Expand Down

0 comments on commit b0b398a

Please sign in to comment.