Skip to content

Commit 037abf2

Browse files
committed
fix issues
1 parent be83f44 commit 037abf2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

wikipedia2vec/wikipedia2vec.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ def train(
268268

269269
vocab_size = len(self.dictionary)
270270

271-
syn0_arr = (np.random.rand(vocab_size * dim_size).astype(np.float32) - 0.5) / dim_size
272-
syn1_arr = np.zeros(vocab_size * dim_size, dtype=np.float32)
271+
syn0_arr = (np.random.rand(vocab_size, dim_size).astype(np.float32) - 0.5) / dim_size
272+
syn1_arr = np.zeros((vocab_size, dim_size), dtype=np.float32)
273273

274274
init_args = (
275275
dump_db,
@@ -533,7 +533,6 @@ def _init_worker(
533533
sent_char_positions=cython.int[:],
534534
sent_token_positions=cython.int[:],
535535
neighbor_entity_indices=cython.int[:],
536-
link_char_flags=cython.int[:],
537536
)
538537
def _train_page(
539538
arg: Tuple[int, str, float],

0 commit comments

Comments
 (0)