Skip to content

Commit 8db1444

Browse files
committed
word2vec
1 parent d49b0d9 commit 8db1444

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

models/recall/word2vec/word2vec_reader.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import io
1818
import six
1919
import time
20+
import paddle
2021
from paddle.io import IterableDataset
2122

2223

@@ -106,8 +107,9 @@ def __iter__(self):
106107
np.array([int(context_id)]).astype('int64'))
107108
np.random.seed(12345)
108109
tmp = np.random.sample(self.neg_num)
109-
time.sleep(0.0001)
110+
np.random.seed(12345)
110111
neg_array = self.cs.searchsorted(tmp)
112+
tmp = []
111113
output.append(
112114
np.array([int(str(i))
113115
for i in neg_array]).astype('int64'))

0 commit comments

Comments
 (0)